Class: EpiDecorator::ViewContext

Inherits:
Object
  • Object
show all
Defined in:
lib/epi_decorator/view_context.rb

Class Method Summary collapse

Class Method Details

.current_controllerObject



12
13
14
# File 'lib/epi_decorator/view_context.rb', line 12

def self.current_controller
  RequestStore.store[:current_controller] || ApplicationController.new
end

.current_controller=(current_controller) ⇒ Object



16
17
18
# File 'lib/epi_decorator/view_context.rb', line 16

def self.current_controller=(current_controller)
  RequestStore.store[:current_controller] = current_controller
end

.current_view_contextObject



4
5
6
# File 'lib/epi_decorator/view_context.rb', line 4

def self.current_view_context
  RequestStore.store[:current_view_context] || current_controller.view_context
end

.current_view_context=(current_view_context) ⇒ Object



8
9
10
# File 'lib/epi_decorator/view_context.rb', line 8

def self.current_view_context=(current_view_context)
  RequestStore.store[:current_view_context] = current_view_context
end