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:
parent
8a889dd45e
commit
791127eee4
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue