提交 1a25ebf8 编写于 作者: T Trevor Turk

Tweak exception message to avoid giving potentially misleading suggestions

上级 a2b7c0e6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册