diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2012-06-24 10:30:34 +0300 |
---|---|---|
committer | Bogdan Gusiev <agresso@gmail.com> | 2012-06-26 09:21:36 +0300 |
commit | 88230b7cf77181c2088cce3314493caa9b3ac1fb (patch) | |
tree | ad9c79bb1bb14f6f2d11fc0a9c428faab5416e24 /actionpack/lib/action_controller | |
parent | 755d1636107f814c6e0f76e7b3f327b9b4bdcc07 (diff) | |
download | rails-88230b7cf77181c2088cce3314493caa9b3ac1fb.tar.gz rails-88230b7cf77181c2088cce3314493caa9b3ac1fb.tar.bz2 rails-88230b7cf77181c2088cce3314493caa9b3ac1fb.zip |
AS::Callbacks: deprecate monkey patch code
Deprecate usage of filter object with #before and #after
methods as around callback
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/caching/sweeping.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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) |