From 6b28c94e20800e6be10b4f7dadff55c3c55f44ce Mon Sep 17 00:00:00 2001
From: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com>
Date: Tue, 6 Mar 2012 08:26:09 -0300
Subject: Add some docs for MiddlewareStackProxy methods and api_only!

[Carlos Antonio da Silva & Santiago Pastorino]
---
 railties/guides/source/configuring.textile | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'railties/guides/source/configuring.textile')

diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile
index 0ab1076fff..d72ff57dc5 100644
--- a/railties/guides/source/configuring.textile
+++ b/railties/guides/source/configuring.textile
@@ -248,6 +248,14 @@ They can also be removed from the stack completely:
 config.middleware.delete ActionDispatch::BestStandardsSupport
 </ruby>
 
+In addition to these methods to handle the stack, if your application is going to be used as an API endpoint only, the middleware stack can be configured like this:
+
+<ruby>
+config.middleware.api_only!
+</ruby>
+
+By doing this, Rails will create a smaller middleware stack, by not adding some middlewares that are usually useful for browser access only, such as Cookies, Session and Flash, BestStandardsSupport, and MethodOverride. You can always add any of them later manually if you want. Refer to the "API App docs":api_app.html for more info on how to setup your application for API only apps.
+
 h4. Configuring i18n
 
 * +config.i18n.default_locale+ sets the default locale of an application used for i18n. Defaults to +:en+.
-- 
cgit v1.2.3

