1
0
Fork 0
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:
Rafael França 2016-03-03 11:42:14 -03:00
commit 3009fa1e08

View file

@ -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