diff options
author | Iain Beeston <iain.beeston@gmail.com> | 2015-02-23 20:33:04 +0000 |
---|---|---|
committer | Iain Beeston <iain.beeston@gmail.com> | 2015-02-24 08:17:24 +0000 |
commit | 3fbc6328439abf14f009ae4b6fbd6ea7157d4fda (patch) | |
tree | 28f916c15081e3e70a0f4438b7d51688b59f8e16 /actionpack/lib/abstract_controller/callbacks.rb | |
parent | 43fb8182663be99418b346f5aa43b0fa1ac95ce4 (diff) | |
download | rails-3fbc6328439abf14f009ae4b6fbd6ea7157d4fda.tar.gz rails-3fbc6328439abf14f009ae4b6fbd6ea7157d4fda.tar.bz2 rails-3fbc6328439abf14f009ae4b6fbd6ea7157d4fda.zip |
Deprecate `AbstractController::Callbacks#skip_action_callback`
As part of #19029, in future `skip_before_action`, `skip_after_action` and
`skip_around_action` will raise an ArgumentError if the specified
callback does not exist. `skip_action_callback` calls all three of these
methods and will almost certainly result in an ArgumentError. If anyone
wants to remove all three callbacks then they can still call the three
individual methods. Therefore let's deprecate `skip_action_callback` now
and remove it when #19029 is merged.
Diffstat (limited to 'actionpack/lib/abstract_controller/callbacks.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index 69f490b327..f4fd1db36c 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -63,6 +63,7 @@ module AbstractController # impossible to skip a callback defined using an anonymous proc # using #skip_action_callback def skip_action_callback(*names) + ActiveSupport::Deprecation.warn('`skip_action_callback` is deprecated and will be removed in the next major version of Rails. Please use skip_before_action, skip_after_action or skip_around_action instead.') skip_before_action(*names) skip_after_action(*names) skip_around_action(*names) |