Skip to content
Browse files

Merge pull request #1834 from jeroenj/cachesweeper-fix-3-0

Fixes an issue where cache sweepers
  • Loading branch information...
2 parents 8467ea3 + 2f9bd25 commit 3add2ea56c0f0453d7f42dbb8269488d8c14e2c1 @spastorino spastorino committed Jun 23, 2011
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
View
5 actionpack/test/controller/filters_test.rb
@@ -529,6 +529,11 @@ def test_before_method_of_sweeper_should_always_return_true
assert sweeper.before(TestController.new)
end
+ def test_after_method_of_sweeper_should_always_return_nil
+ sweeper = ActionController::Caching::Sweeper.send(:new)
+ assert_nil sweeper.after(TestController.new)
+ end
+
def test_non_yielding_around_filters_not_returning_false_do_not_raise
controller = NonYieldingAroundFilterController.new
controller.instance_variable_set "@filter_return_value", true

0 comments on commit 3add2ea

Please sign in to comment.
Something went wrong with that request. Please try again.