mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Niceify the dynamic routes deprecation messages
Follow-up to #23980. - Fix grammar: "be remove" -> "be removed". - Wrap lines at 80 chars. Lurvely ;-)
This commit is contained in:
parent
2c53e27992
commit
eba0041c21
1 changed files with 8 additions and 2 deletions
|
@ -515,11 +515,17 @@ module ActionDispatch
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue