Permalink
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 8a889dd commit 791127eee45ee53b3ee897c647eceff17056c3e8 Jeroen Jacobs committed Jun 21, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_controller/caching/sweeping.rb
View
1 actionpack/lib/action_controller/caching/sweeping.rb
@@ -61,6 +61,7 @@ def before(controller)
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

0 comments on commit 791127e

Please sign in to comment.