diff options
author | Boris Staal <boris@staal.io> | 2013-03-05 19:05:14 +0700 |
---|---|---|
committer | Boris Staal <boris@staal.io> | 2013-03-05 19:27:02 +0700 |
commit | 3ef641e0956fa0e939aef63f677ea6c314f5a348 (patch) | |
tree | 3ba0facdee9c686dca7c68d263db7f5cc0d94f7a /actionpack/lib | |
parent | 3f490caeef38d2e88b50d49692a204d2e9424c67 (diff) | |
download | rails-3ef641e0956fa0e939aef63f677ea6c314f5a348.tar.gz rails-3ef641e0956fa0e939aef63f677ea6c314f5a348.tar.bz2 rails-3ef641e0956fa0e939aef63f677ea6c314f5a348.zip |
Routing match `via` option requirement exception message made more explicit
Diffstat (limited to 'actionpack/lib')
-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 |