Skip to content

Commit

Permalink
Delegate #code to shipment_method
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmay3011 committed Dec 2, 2015
1 parent 92eb035 commit 21224ef
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions core/app/models/spree/shipping_rate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class ShippingRate < Spree::Base

delegate :order, :currency, to: :shipment
delegate :name, to: :shipping_method
delegate :code, to: :shipping_method, prefix: true

def display_base_price
Spree::Money.new(cost, currency: currency)
Expand Down Expand Up @@ -46,10 +47,6 @@ def shipping_method
Spree::ShippingMethod.unscoped { super }
end

def shipping_method_code
shipping_method.code
end

def tax_rate
Spree::TaxRate.unscoped { super }
end
Expand Down

0 comments on commit 21224ef

Please sign in to comment.