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 8ebc17f commit 2f9bd25a569d3f7f7c4dbde96b406eca1e2a29aa Jeroen Jacobs committed Jun 21, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_controller/caching/sweeping.rb
1 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 2f9bd25

Please sign in to comment.