Skip to content

Commit

Permalink
Tweak exception message to avoid giving potentially misleading sugges…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
trevorturk committed Mar 20, 2013
1 parent a2b7c0e commit 1a25ebf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions actionpack/lib/action_dispatch/routing/route_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ def add_route(app, conditions = {}, requirements = {}, defaults = {}, name = nil

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

Expand Down

0 comments on commit 1a25ebf

Please sign in to comment.