Module: Catche::Controller::Base
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/catche/controller/base.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#_save_fragment(name, options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/catche/controller/base.rb', line 24 def _save_fragment(name, ={}) key = fragment_cache_key(name) object = [:tag] = [] if object.present? if object.respond_to?(:call) object = self.instance_exec(self, &object) if object.respond_to?(:tags) = object.(self) else = Array.new(object) end else = Array.new(object) end Catche::Tag.tag! key, * # Store for future reference @catche_cache_object = object end super end |