From 791127eee45ee53b3ee897c647eceff17056c3e8 Mon Sep 17 00:00:00 2001 From: Jeroen Jacobs Date: Tue, 21 Jun 2011 12:34:00 +0200 Subject: Fixes an issue where cache sweepers with only after filters would have no controller object It would raise undefined method controller_name for nil --- actionpack/lib/action_controller/caching/sweeping.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_controller/caching') diff --git a/actionpack/lib/action_controller/caching/sweeping.rb b/actionpack/lib/action_controller/caching/sweeping.rb index e9db0d97b6..938a6ae81c 100644 --- a/actionpack/lib/action_controller/caching/sweeping.rb +++ b/actionpack/lib/action_controller/caching/sweeping.rb @@ -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 -- cgit v1.2.3