1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix NameError in skip_filter. callback doesn't exist.

This commit is contained in:
yuuji.yaginuma 2015-02-27 09:03:31 +09:00
parent 38218929e9
commit 0eec7d2c96
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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