diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 38e9288572f28b0ef4a8ac70c87a0a999f6eeb08..7fb4719fa00ebf3c5e878b8164508045930b0cc5 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -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