Module: Spree::Core::ControllerHelpers::Pricing

Extended by:
ActiveSupport::Concern
Included in:
Order
Defined in:
lib/spree/core/controller_helpers/pricing.rb

Instance Method Summary collapse

Instance Method Details

#current_currencyObject



23
24
25
# File 'lib/spree/core/controller_helpers/pricing.rb', line 23

def current_currency
  current_pricing_options.currency
end

#current_pricing_optionsObject



16
17
18
19
20
21
# File 'lib/spree/core/controller_helpers/pricing.rb', line 16

def current_pricing_options
  Spree::Config.pricing_options_class.new(
    currency: current_store.try!(:default_currency).presence || Spree::Config[:currency],
    country_iso: current_store.try!(:cart_tax_country_iso).presence
  )
end