aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching/sweeping.rb
diff options
context:
space:
mode:
authorJeroen Jacobs <info@jeroenj.be>2011-06-21 12:34:00 +0200
committerJeroen Jacobs <info@jeroenj.be>2011-06-21 12:34:00 +0200
commit791127eee45ee53b3ee897c647eceff17056c3e8 (patch)
tree390308c29e15d579180b62953248571588bd62e7 /actionpack/lib/action_controller/caching/sweeping.rb
parent8a889dd45e088014c77f4cd799c9e5ddea0b54c6 (diff)
downloadrails-791127eee45ee53b3ee897c647eceff17056c3e8.tar.gz
rails-791127eee45ee53b3ee897c647eceff17056c3e8.tar.bz2
rails-791127eee45ee53b3ee897c647eceff17056c3e8.zip
Fixes an issue where cache sweepers with only after filters would have no controller object
It would raise undefined method controller_name for nil
Diffstat (limited to 'actionpack/lib/action_controller/caching/sweeping.rb')
-rw-r--r--actionpack/lib/action_controller/caching/sweeping.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/caching/sweeping.rb b/actionpack/lib/action_controller/caching/sweeping.rb
index e9db0d97b6..938a6ae81c 100644
--- a/actionpack/lib/action_controller/caching/sweeping.rb
+++ b/actionpack/lib/action_controller/caching/sweeping.rb
@@ -61,6 +61,7 @@ module ActionController #:nodoc:
end
def after(controller)
+ self.controller = controller
callback(:after) if controller.perform_caching
# Clean up, so that the controller can be collected after this request
self.controller = nil