Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing match via option requirement exception message made more explicit #9561

Merged
merged 1 commit into from
Mar 5, 2013
Merged

Routing match via option requirement exception message made more explicit #9561

merged 1 commit into from
Mar 5, 2013

Conversation

inossidabile
Copy link
Contributor

Current exception message makes it feel like match was removed completely. I believe it should be more explicit about via option (at least since it is a root reason of the exception itself). Clarified it a bit.

@@ -181,7 +181,8 @@ def normalize_conditions!

if !via_all && options[:via].blank?
msg = "You should not use the `match` method in your router without specifying an HTTP method.\n" \
"If you want to expose your action to GET, use `get` in the router:\n\n" \
"If you want to expose your action to both GET and POST, use `via: [:get, :post]` option.\n" \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps "add via: [:get, :post] option." instead of "use" in this line would make more sense? Otherwise it makes sense adding this note.

@inossidabile
Copy link
Contributor Author

@carlosantoniodasilva force-pushing removed the commit you commented at 💥. But I did what you suggested.

carlosantoniodasilva added a commit that referenced this pull request Mar 5, 2013
…ment_exception_message

Routing match `via` option requirement exception message made more explicit
@carlosantoniodasilva carlosantoniodasilva merged commit 5cf472e into rails:master Mar 5, 2013
@carlosantoniodasilva
Copy link
Member

Thanks.

@steveklabnik
Copy link
Member

orce-pushing removed the commit you commented at 💥

It's supposed to, but github gives you an 'outdated diff discussion' link, so you can still read it. :)

@inossidabile inossidabile deleted the explicit_match_via_requirement_exception_message branch March 5, 2013 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants