From 88230b7cf77181c2088cce3314493caa9b3ac1fb Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Sun, 24 Jun 2012 10:30:34 +0300 Subject: AS::Callbacks: deprecate monkey patch code Deprecate usage of filter object with #before and #after methods as around callback --- actionpack/lib/action_controller/caching/sweeping.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/caching/sweeping.rb b/actionpack/lib/action_controller/caching/sweeping.rb index cc1fa23935..39da15e26a 100644 --- a/actionpack/lib/action_controller/caching/sweeping.rb +++ b/actionpack/lib/action_controller/caching/sweeping.rb @@ -72,6 +72,12 @@ module ActionController #:nodoc: self.controller = nil end + def around(controller) + before(controller) + yield + after(controller) + end + protected # gets the action cache path for the given options. def action_path_for(options) -- cgit v1.2.3