diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-02-27 07:27:42 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-02-27 07:27:42 -0300 |
commit | 242632167c0797ce2b5a212f67b2179c6c6b38e1 (patch) | |
tree | 17c089dff6108989612fc4a9512ef5896410969f | |
parent | 75ddb54eb03a818e263a1836154e7429693e082d (diff) | |
parent | 0eec7d2c96ab67b1a6ac26882a4f610e8ac1e2a0 (diff) | |
download | rails-242632167c0797ce2b5a212f67b2179c6c6b38e1.tar.gz rails-242632167c0797ce2b5a212f67b2179c6c6b38e1.tar.bz2 rails-242632167c0797ce2b5a212f67b2179c6c6b38e1.zip |
Merge pull request #19104 from y-yagi/fix_skip_filter
fix NameError in `skip_filter`. callback doesn't exist.
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/filters_test.rb | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index f4fd1db36c..681caba457 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -70,7 +70,7 @@ module AbstractController end def skip_filter(*names) - ActiveSupport::Deprecation.warn("#{callback}_filter is deprecated and will be removed in Rails 5.1. Use #{callback}_action instead.") + ActiveSupport::Deprecation.warn("`skip_filter` is deprecated and will be removed in Rails 5.1. Use skip_before_action, skip_after_action or skip_around_action instead.") skip_action_callback(*names) end diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index 26b94f0db8..a1ce12a13e 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -1074,6 +1074,14 @@ class YieldingAroundFiltersTest < ActionController::TestCase end end + def test_deprecated_skip_filter + assert_deprecated do + Class.new(PostsController) do + skip_filter :clean_up + end + end + end + protected def test_process(controller, action = "show") @controller = controller.is_a?(Class) ? controller.new : controller |