diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-03-05 04:38:58 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-03-05 04:38:58 -0800 |
commit | 5cf472e04398ac2c67236a41566d95c0287b34fa (patch) | |
tree | 5f91583aba3c5250d2379d90597f97bc3a1623bc /actionpack/lib/action_dispatch/routing | |
parent | ee444697073b123bbf0e36511b581f7df7419636 (diff) | |
parent | 3ef641e0956fa0e939aef63f677ea6c314f5a348 (diff) | |
download | rails-5cf472e04398ac2c67236a41566d95c0287b34fa.tar.gz rails-5cf472e04398ac2c67236a41566d95c0287b34fa.tar.bz2 rails-5cf472e04398ac2c67236a41566d95c0287b34fa.zip |
Merge pull request #9561 from inossidabile/explicit_match_via_requirement_exception_message
Routing match `via` option requirement exception message made more explicit
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 4fbe156a72..c5f2b33602 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -181,7 +181,8 @@ module ActionDispatch 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 |