提交 eba0041c 编写于 作者: J Jon Atack

Niceify the dynamic routes deprecation messages

Follow-up to #23980.

- Fix grammar: "be remove" -> "be removed".

- Wrap lines at 80 chars.

Lurvely ;-)
上级 2c53e279
...@@ -515,11 +515,17 @@ def add_route(mapping, path_ast, name, anchor) ...@@ -515,11 +515,17 @@ def add_route(mapping, path_ast, name, anchor)
named_routes[name] = route if name named_routes[name] = route if name
if route.segment_keys.include?(:controller) 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 end
if route.segment_keys.include?(:action) 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 end
route route
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册