Sha256: 15379fbd50508d8220d9264d35d3ebd94477ead86030177f20a940fbd0515c70

Contents?: true

Size: 683 Bytes

Versions: 17

Compression:

Stored size: 683 Bytes

Contents

require 'spree/deprecation'

module Spree
  module Core
    module ControllerHelpers
      module Pricing
        extend ActiveSupport::Concern

        included do
          helper_method :current_currency
          helper_method :current_pricing_options
        end

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

        def current_currency
          current_pricing_options.currency
        end
        deprecate current_currency: :current_pricing_options, deprecator: Spree::Deprecation
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
solidus_core-2.0.3 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.4.2 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.3.2 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.0.2 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.4.1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.0.1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.0.0 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.4.0 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.0.0.rc1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.4.0.rc1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.0.0.beta1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.4.0.beta1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.3.1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.3.0 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.3.0.rc2 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.3.0.rc1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-1.3.0.beta1 lib/spree/core/controller_helpers/pricing.rb