Class: ActionController::Caching::Sweeper
- Inherits:
-
ActiveRecord::Observer
- Object
- ActiveRecord::Observer
- ActionController::Caching::Sweeper
show all
- Defined in:
- lib/action_controller/caching/sweeping.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *arguments, &block) ⇒ Object
89
90
91
92
|
# File 'lib/action_controller/caching/sweeping.rb', line 89
def method_missing(method, *arguments, &block)
return if @controller.nil?
@controller.__send__(method, *arguments, &block)
end
|
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller
55
56
57
|
# File 'lib/action_controller/caching/sweeping.rb', line 55
def controller
@controller
end
|
Instance Method Details
#after(controller) ⇒ Object
63
64
65
66
67
|
# File 'lib/action_controller/caching/sweeping.rb', line 63
def after(controller)
callback(:after) if controller.perform_caching
self.controller = nil
end
|
#before(controller) ⇒ Object
57
58
59
60
61
|
# File 'lib/action_controller/caching/sweeping.rb', line 57
def before(controller)
self.controller = controller
callback(:before) if controller.perform_caching
true end
|