Remove deprecated support passing path as `nil` in `ActionDispatch::Routing::Mapper#match`

上级 a3ff9db6
* Remove deprecated support passing path as `nil` in `ActionDispatch::Routing::Mapper#match`.
*Rafael Mendonça França*
* Remove deprecated `cache_control` argument from `ActionDispatch::Static#initialize`.
*Rafael Mendonça França*
......
......@@ -1558,11 +1558,7 @@ def match(path, *rest, &block)
options = path
path, to = options.find { |name, _value| name.is_a?(String) }
if path.nil?
ActiveSupport::Deprecation.warn "Omitting the route path is deprecated. "\
"Specify the path with a String or a Symbol instead."
path = ""
end
raise ArgumentError, "Route path not specified" if path.nil?
case to
when Symbol
......
......@@ -373,9 +373,7 @@ def test_pagemarks
post "create", as: ""
put "update"
get "remove", action: :destroy, as: :remove
tc.assert_deprecated do
get action: :show, as: :show
end
get "", action: :show, as: :show
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册