From 0eec7d2c96ab67b1a6ac26882a4f610e8ac1e2a0 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 27 Feb 2015 09:03:31 +0900 Subject: [PATCH] fix NameError in `skip_filter`. callback doesn't exist. --- actionpack/lib/abstract_controller/callbacks.rb | 2 +- actionpack/test/controller/filters_test.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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