From 7143e0da037a0f56801023e2f8c17867814fe7b1 Mon Sep 17 00:00:00 2001 From: Yuki Nishijima Date: Sat, 6 Sep 2014 19:32:49 -0700 Subject: [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. --- guides/source/action_controller_overview.md | 6 +++--- 1 file 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. -- cgit v1.2.3