Class: ActionController::Caching::Sweeper

Inherits:
ActiveRecord::Observer
  • Object
show all
Defined in:
lib/action_controller/caching.rb

Overview

:nodoc:

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) ⇒ Object (private)



662
663
664
665
# File 'lib/action_controller/caching.rb', line 662

def method_missing(method, *arguments)
  return if @controller.nil?
  @controller.send!(method, *arguments)
end

Instance Attribute Details

#controllerObject

Returns the value of attribute controller.



629
630
631
# File 'lib/action_controller/caching.rb', line 629

def controller
  @controller
end

Instance Method Details

#after(controller) ⇒ Object



636
637
638
639
640
# File 'lib/action_controller/caching.rb', line 636

def after(controller)
  callback(:after)
  # Clean up, so that the controller can be collected after this request
  self.controller = nil
end

#before(controller) ⇒ Object



631
632
633
634
# File 'lib/action_controller/caching.rb', line 631

def before(controller)
  self.controller = controller
  callback(:before)
end