提交 3009fa1e 编写于 作者: R Rafael França

Merge pull request #24024 from jonatack/niceify-dynamic-routes-deprecation-messages

Niceify the dynamic routes deprecation messages
......@@ -515,11 +515,17 @@ def add_route(mapping, path_ast, name, anchor)
named_routes[name] = route if name
if route.segment_keys.include?(:controller)
ActiveSupport::Deprecation.warn("Using a dynamic :controller segment in a route is deprecated and will be remove in Rails 5.1")
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Using a dynamic :controller segment in a route is deprecated and
will be removed in Rails 5.1
MSG
end
if route.segment_keys.include?(:action)
ActiveSupport::Deprecation.warn("Using a dynamic :action segment in a route is deprecated and will be remove in Rails 5.1")
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Using a dynamic :action segment in a route is deprecated and
will be removed in Rails 5.1
MSG
end
route
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册