diff options
Diffstat (limited to 'guides/source/api_app.md')
-rw-r--r-- | guides/source/api_app.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guides/source/api_app.md b/guides/source/api_app.md index fb3127555e..17695c5db0 100644 --- a/guides/source/api_app.md +++ b/guides/source/api_app.md @@ -163,6 +163,14 @@ class definition: config.api_only = true ``` +Optionally, in `config/environments/development.rb` add the following line +to render error responses using the API format (JSON by default) when it +is a local request: + +```ruby +config.debug_exception_response_format = :api +``` + Finally, inside `app/controllers/application_controller.rb`, instead of: ```ruby |