1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixes an issue where cache sweepers with only after filters would have no controller object

It would raise undefined method controller_name for nil
This commit is contained in:
Jeroen Jacobs 2011-06-21 12:34:00 +02:00
parent 8a889dd45e
commit 791127eee4

View file

@ -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