Module: Spree::ViewContext

Defined in:
lib/spree/i18n/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.contextObject



7
8
9
# File 'lib/spree/i18n/base.rb', line 7

def self.context
  @context
end

.context=(context) ⇒ Object



3
4
5
# File 'lib/spree/i18n/base.rb', line 3

def self.context=(context)
  @context = context
end

Instance Method Details

#view_contextObject



11
12
13
14
15
# File 'lib/spree/i18n/base.rb', line 11

def view_context
  super.tap do |context|
    Spree::ViewContext.context = context
  end
end