Module: ActionView::Helpers::WorkareaCache
- Included in:
- ActionView::Helpers
- Defined in:
- lib/workarea/ext/freedom_patches/action_view_cache_helper.rb
Instance Method Summary collapse
Instance Method Details
#cache ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/workarea/ext/freedom_patches/action_view_cache_helper.rb', line 4 def cache(*) if logged_in? && current_user.admin? yield nil else super end end |
#cache_fragment_name ⇒ Object
13 14 15 |
# File 'lib/workarea/ext/freedom_patches/action_view_cache_helper.rb', line 13 def cache_fragment_name(*) super.tap { |result| result << cache_varies if cache_varies.present? } end |
#cache_varies ⇒ Object
17 18 19 |
# File 'lib/workarea/ext/freedom_patches/action_view_cache_helper.rb', line 17 def cache_varies request.env['workarea.cache_varies'] end |