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.



9
10
11
12
13
# File 'lib/spree/core/current_store.rb', line 9

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:



19
20
21
# File 'lib/spree/core/current_store.rb', line 19

def store
  @current_store_selector.store
end