Class: BackgroundCache::Controller::BackgroundCacheFilter
- Inherits:
-
Object
- Object
- BackgroundCache::Controller::BackgroundCacheFilter
- Defined in:
- lib/background_cache/controller.rb
Instance Method Summary collapse
Instance Method Details
#after(controller) ⇒ Object
47 48 49 50 51 |
# File 'lib/background_cache/controller.rb', line 47 def after(controller) if @background_cache_layout controller.class.layout(@background_cache_layout) end end |
#before(controller) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/background_cache/controller.rb', line 34 def before(controller) cache = BackgroundCache::Config.current_cache if cache if cache[:layout] == false @background_cache_layout = controller.active_layout controller.class.layout(false) else @background_cache_layout = nil end end true end |