diff options
author | Yuki Nishijima <mail@yukinishijima.net> | 2014-09-06 19:32:49 -0700 |
---|---|---|
committer | Yuki Nishijima <mail@yukinishijima.net> | 2014-09-06 19:55:17 -0700 |
commit | 7143e0da037a0f56801023e2f8c17867814fe7b1 (patch) | |
tree | 3082429f1b7aec3e0003f50fe20ac30783f71efc /guides | |
parent | 749e2895544a68c8ea188d709a14e486beb24b00 (diff) | |
download | rails-7143e0da037a0f56801023e2f8c17867814fe7b1.tar.gz rails-7143e0da037a0f56801023e2f8c17867814fe7b1.tar.bz2 rails-7143e0da037a0f56801023e2f8c17867814fe7b1.zip |
[guides] Use `match ..., via: :all` in the custom exceptions app [ci skip]
Using `get` results in an unexpected error page(returning empty body) for requests of other HTTP mehtods other than GET. Use `match ..., via:
:all` so the exceptions app can be more stable.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/action_controller_overview.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md index 4c04a06dbb..ca1e79d3ce 100644 --- a/guides/source/action_controller_overview.md +++ b/guides/source/action_controller_overview.md @@ -1183,9 +1183,9 @@ First define your app own routes to display the errors page. * `config/routes.rb` ```ruby - get '/404', to: 'errors#not_found' - get '/422', to: 'errors#unprocessable_entity' - get '/500', to: 'errors#server_error' + match '/404', via: :all, to: 'errors#not_found' + match '/422', via: :all, to: 'errors#unprocessable_entity' + match '/500', via: :all, to: 'errors#server_error' ``` Create the controller and views. |