--- actionpack/lib/action_controller/caching/sweeper.rb 2010-03-19
14:05:13.000000000 +0100
+++ actionpack/lib/action_controller/caching/sweeper.rb 2010-03-19
14:31:43.000000000 +0100
@@ -3,17 +3,12 @@
module ActionController #:nodoc:
module Caching
class Sweeper < ActiveRecord::Observer #:nodoc:
- attr_accessor :controller
-
def before(controller)
- self.controller = controller
- callback(:before) if controller.perform_caching
+ callback(:before, controller) if controller.perform_caching
end
def after(controller)
- callback(:after) if controller.perform_caching
- # Clean up, so that the controller can be collected after
this request
- self.controller = nil
+ callback(:after, controller) if controller.perform_caching
end
protected
@@ -28,7 +23,7 @@
end
private
- def callback(timing)
+ def callback(timing, controller)
controller_callback_method_name = "#{timing}
_#{controller.controller_name.underscore}"
action_callback_method_name =
"#{controller_callback_method_name}_#{controller.action_name}"
--
You received this message because you are subscribed to the Google Groups
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/communityengine?hl=en.