Sha256: cef140b3008b44220e54b319156fc2a85159d1864274e744b7073a2c86cb201b

Contents?: true

Size: 619 Bytes

Versions: 32

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

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.from_context(self)
        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

32 entries across 32 versions & 1 rubygems

Version Path
solidus_core-2.11.17 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.16 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.15 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.14 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.13 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.12 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.11 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.10.5 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.10 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.9 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.8 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.7 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.6 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.5 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.4 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.3 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.2 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.1 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.10.3 lib/spree/core/controller_helpers/pricing.rb
solidus_core-2.11.0 lib/spree/core/controller_helpers/pricing.rb