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 authored and jhawthorn committed Jan 8, 2016
1 parent 306be58 commit 9cc978f
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 @@ -41,9 +42,5 @@ def display_price
def display_tax_amount(tax_amount)
Spree::Money.new(tax_amount, currency: currency)
end

def shipping_method_code
shipping_method.code
end
end
end

0 comments on commit 9cc978f

Please sign in to comment.