Module: Cell::RailsExtensions::ViewModel
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/cell/rails.rb
Overview
Gets included into Cell::ViewModel in a Rails environment.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#cache_store ⇒ Object
we want to use DI to set a cache store in cell/rails.
- #call ⇒ Object
- #parent_controller ⇒ Object (also: #controller)
- #perform_caching? ⇒ Boolean
Instance Method Details
#cache_store ⇒ Object
we want to use DI to set a cache store in cell/rails.
66 67 68 |
# File 'lib/cell/rails.rb', line 66 def cache_store # we want to use DI to set a cache store in cell/rails. ::ActionController::Base.cache_store end |
#call ⇒ Object
53 54 55 |
# File 'lib/cell/rails.rb', line 53 def call(*) super.html_safe end |
#parent_controller ⇒ Object Also known as: controller
57 58 59 |
# File 'lib/cell/rails.rb', line 57 def parent_controller context[:controller] end |
#perform_caching? ⇒ Boolean
62 63 64 |
# File 'lib/cell/rails.rb', line 62 def perform_caching? ::ActionController::Base.perform_caching end |