From 6cb578c018b1136696f9c9d30ed1352c2c014f30 Mon Sep 17 00:00:00 2001 From: Jorge Bejar Date: Mon, 20 Jul 2015 16:46:21 -0300 Subject: [PATCH] Mention the debug_exception_response_format config in guides --- guides/source/api_app.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- GitLab