Browse files

Fixes an issue where cache sweepers with only after filters would hav…

…e no controller object

It would raise undefined method controller_name for nil
  • Loading branch information...
1 parent 7ff4aed commit a46d231c7933001d2c2b78a33686fd650c6c97df Jeroen Jacobs committed Jun 21, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_controller/caching/sweeping.rb
@@ -61,6 +61,7 @@ def before(controller)
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

0 comments on commit a46d231

Please sign in to comment.