diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-03-03 11:42:14 -0300 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-03-03 11:42:14 -0300 |
commit | 3009fa1e089ff1133ce95c767063ca9f9cdb130f (patch) | |
tree | 75f5a90d839697404c4eb4ac4fcfdca877bc0f27 | |
parent | 4328e4b5930d5d89cc83c7693c212e4bb9b0a7d0 (diff) | |
parent | eba0041c2132e46bf9e040b31059e020e590d2ae (diff) | |
download | rails-3009fa1e089ff1133ce95c767063ca9f9cdb130f.tar.gz rails-3009fa1e089ff1133ce95c767063ca9f9cdb130f.tar.bz2 rails-3009fa1e089ff1133ce95c767063ca9f9cdb130f.zip |
Merge pull request #24024 from jonatack/niceify-dynamic-routes-deprecation-messages
Niceify the dynamic routes deprecation messages
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index f807a8fe16..85f202b823 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -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 |