diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-02-27 09:03:31 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-02-27 09:03:31 +0900 |
commit | 0eec7d2c96ab67b1a6ac26882a4f610e8ac1e2a0 (patch) | |
tree | 5d5c8aaf19a9bcd3ff2faa8bf90e746f99f2e08d /actionpack | |
parent | 38218929e9b3205a2a731660b3c5527937e1c015 (diff) | |
download | rails-0eec7d2c96ab67b1a6ac26882a4f610e8ac1e2a0.tar.gz rails-0eec7d2c96ab67b1a6ac26882a4f610e8ac1e2a0.tar.bz2 rails-0eec7d2c96ab67b1a6ac26882a4f610e8ac1e2a0.zip |
fix NameError in `skip_filter`. callback doesn't exist.
Diffstat (limited to 'actionpack')
-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 |