Merge pull request #19104 from y-yagi/fix_skip_filter

fix NameError in `skip_filter`. callback doesn't exist.
This commit is contained in:
Carlos Antonio da Silva 2015-02-27 07:27:42 -03:00
commit 242632167c
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