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
421 422 423 424 425 426 427 428 |
# File 'lib/action_controller/caching.rb', line 421 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 |