aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/api_app.md
diff options
context:
space:
mode:
authorAkshay <akshaymohite31@yahoo.com>2016-02-19 11:52:50 +0530
committerAkshay <akshaymohite31@yahoo.com>2016-02-25 05:03:21 +0530
commitafea912a75a7b0e9be24811b8b4b1ad4326b1c4a (patch)
treec9e690fcc9825dc6cf00c15f8aaf06fbe0303736 /guides/source/api_app.md
parentc889942368e194d0559d6d90d9e17e4f17c77f09 (diff)
downloadrails-afea912a75a7b0e9be24811b8b4b1ad4326b1c4a.tar.gz
rails-afea912a75a7b0e9be24811b8b4b1ad4326b1c4a.tar.bz2
rails-afea912a75a7b0e9be24811b8b4b1ad4326b1c4a.zip
[ci skip] Need to mention debug_exception_response_format in the api_app documentation.
- #23771 removed the reference to debug_exception_response_format from the api_app documentation. - We need to let users know, they have ability to configure debug_exception_response_format in their development environment. - Added documentation for the same in api_app.md file - Grammar corrections
Diffstat (limited to 'guides/source/api_app.md')
-rw-r--r--guides/source/api_app.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/guides/source/api_app.md b/guides/source/api_app.md
index 0598b9c7fa..8dba914923 100644
--- a/guides/source/api_app.md
+++ b/guides/source/api_app.md
@@ -166,6 +166,23 @@ class definition:
config.api_only = true
```
+In `config/environments/development.rb`, set `config.debug_exception_response_format`
+to configure the format used in responses when errors occur in development mode.
+
+To render an HTML page with debugging information, use the value `:default`.
+
+```ruby
+config.debug_exception_response_format = :default
+```
+
+To render debugging information preserving the response format, use the value `:api`.
+
+```ruby
+config.debug_exception_response_format = :api
+```
+
+By default, `config.debug_exception_response_format` is set to `:api`.
+
Finally, inside `app/controllers/application_controller.rb`, instead of:
```ruby