mirror of https://github.com/rails/rails
Merge pull request #19104 from y-yagi/fix_skip_filter
fix NameError in `skip_filter`. callback doesn't exist.
This commit is contained in:
commit
242632167c
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue