Class: EpiDecorator::ViewContext
- Inherits:
-
Object
- Object
- EpiDecorator::ViewContext
- Defined in:
- lib/epi_decorator/view_context.rb
Class Method Summary collapse
- .current_controller ⇒ Object
- .current_controller=(current_controller) ⇒ Object
- .current_view_context ⇒ Object
- .current_view_context=(current_view_context) ⇒ Object
Class Method Details
.current_controller ⇒ Object
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_context ⇒ Object
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 |