mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #24024 from jonatack/niceify-dynamic-routes-deprecation-messages
Niceify the dynamic routes deprecation messages
This commit is contained in:
commit
3009fa1e08
1 changed files with 8 additions and 2 deletions
|
@ -515,11 +515,17 @@ module ActionDispatch
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue