1
0
Fork 0
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:
Jon Atack 2016-03-03 13:40:50 +01:00
parent 2c53e27992
commit eba0041c21

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