aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorTrevor Turk <trevorturk@gmail.com>2013-03-20 12:48:35 -0500
committerTrevor Turk <trevorturk@gmail.com>2013-03-20 12:48:35 -0500
commit1a25ebf884206df34b30a0bac8345d75fbc6d13c (patch)
tree7ef37c7d8d5a87907ac103b1d38f3c38e19e0ee0 /actionpack/lib/action_dispatch
parenta2b7c0e69d671294067b625c749be6fdbec7b433 (diff)
downloadrails-1a25ebf884206df34b30a0bac8345d75fbc6d13c.tar.gz
rails-1a25ebf884206df34b30a0bac8345d75fbc6d13c.tar.bz2
rails-1a25ebf884206df34b30a0bac8345d75fbc6d13c.zip
Tweak exception message to avoid giving potentially misleading suggestions
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 38e9288572..7fb4719fa0 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -405,8 +405,9 @@ module ActionDispatch
if name && named_routes[name]
raise ArgumentError, "Invalid route name, already in use: '#{name}' \n" \
- "This conflict might arise if your routes contain `resources :#{name.pluralize}`. " \
- "If so, you can restrict the routes created with `resources` as explained here: \n" \
+ "You may have defined two routes with the same name using the `:as` option, or "
+ "you may be overriding a route already defined by a resource with the same naming. " \
+ "For the latter, you can restrict the routes created with `resources` as explained here: \n" \
"http://guides.rubyonrails.org/routing.html#restricting-the-routes-created"
end