Module: ActionController::Caching::Sweeping::ClassMethods
- Defined in:
- lib/action_controller/caching.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#cache_sweeper(*sweepers) ⇒ Object
390 391 392 393 394 395 396 397 |
# File 'lib/action_controller/caching.rb', line 390 def cache_sweeper(*sweepers) return unless perform_caching configuration = sweepers.last.is_a?(Hash) ? sweepers.pop : {} sweepers.each do |sweeper| observer(sweeper) after_filter(Object.const_get(Inflector.classify(sweeper)).instance, :only => configuration[:only]) end end |