Class: Spree::Core::CurrentStore

Inherits:
Object
  • Object
show all
Defined in:
lib/spree/core/current_store.rb

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ CurrentStore

Returns a new instance of CurrentStore



7
8
9
10
11
# File 'lib/spree/core/current_store.rb', line 7

def initialize(request)
  @request = request
  @current_store_selector = Spree::Config.current_store_selector_class.new(request)
  Spree::Deprecation.warn "Using Spree::Core::CurrentStore is deprecated. Use Spree::Config.current_store_selector_class instead", caller
end

Instance Method Details

#storeSpree::Store

Delegate store selection to Spree::Config.current_store_selector_class Using this class is deprecated.

Returns:



17
18
19
# File 'lib/spree/core/current_store.rb', line 17

def store
  @current_store_selector.store
end