Skip to content

Commit

Permalink
Fixes an issue where cache sweepers with only after filters would hav…
Browse files Browse the repository at this point in the history
…e no controller object

It would raise undefined method controller_name for nil
  • Loading branch information
Jeroen Jacobs committed Jun 23, 2011
1 parent 7ff4aed commit a46d231
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions actionpack/lib/action_controller/caching/sweeping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a46d231

Please sign in to comment.