Permalink
Browse files

Merge pull request #9561 from inossidabile/explicit_match_via_require…

…ment_exception_message

Routing match `via` option requirement exception message made more explicit
  • Loading branch information...
2 parents ee44469 + 3ef641e commit 5cf472e04398ac2c67236a41566d95c0287b34fa @carlosantoniodasilva carlosantoniodasilva committed Mar 5, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -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, add `via: [:get, :post]` option.\n" \
+ "If you want to expose your action to GET, use `get` in the router:\n" \
" Instead of: match \"controller#action\"\n" \
" Do: get \"controller#action\""
raise msg

0 comments on commit 5cf472e

Please sign in to comment.