Sha256: 62bcc9437c69e6d38d6605fcc97a847c9034f16c21edfef2377efb159ba8197c

Contents?: true

Size: 708 Bytes

Versions: 26

Compression:

Stored size: 708 Bytes

Contents

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

        # @!attribute [rw] current_store_class
        #   @!scope class
        #   Extension point for overriding how the current store is chosen.
        #   Defaults to checking headers and server name
        #   @return [#store] class used to help find the current store
        included do
          class_attribute :current_store_class
          self.current_store_class = Spree::Core::CurrentStore

          helper_method :current_store
        end

        def current_store
          @current_store ||= current_store_class.new(request).store
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
solidus_core-2.2.2 lib/spree/core/controller_helpers/store.rb
solidus_core-2.1.1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.0.3 lib/spree/core/controller_helpers/store.rb
solidus_core-1.4.2 lib/spree/core/controller_helpers/store.rb
solidus_core-1.3.2 lib/spree/core/controller_helpers/store.rb
solidus_core-2.0.2 lib/spree/core/controller_helpers/store.rb
solidus_core-1.4.1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.2.1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.2.0 lib/spree/core/controller_helpers/store.rb
solidus_core-2.2.0.rc1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.2.0.beta1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.1.0 lib/spree/core/controller_helpers/store.rb
solidus_core-2.1.0.rc1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.0.1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.1.0.beta1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.0.0 lib/spree/core/controller_helpers/store.rb
solidus_core-1.4.0 lib/spree/core/controller_helpers/store.rb
solidus_core-2.0.0.rc1 lib/spree/core/controller_helpers/store.rb
solidus_core-1.4.0.rc1 lib/spree/core/controller_helpers/store.rb
solidus_core-2.0.0.beta1 lib/spree/core/controller_helpers/store.rb