From 6d965355244055e7bef995f1a263cb1cd2993e45 Mon Sep 17 00:00:00 2001
From: thoefer <mail@tomhoefer.de>
Date: Wed, 15 Jun 2011 12:14:17 +0200
Subject: =?UTF-8?q?Updated=20rails=C2=B4s=20guides=20on=20the=20config.ser?=
 =?UTF-8?q?ve=5Fstatic=5Fassets=20and=20it=C2=B4s=20settings=20in=20produc?=
 =?UTF-8?q?tion=20mode=20using=20WEBrick.=20This=20documentation=20has=20i?=
 =?UTF-8?q?t=C2=B4s=20roots=20in=20#issue1657.=20You=20have=20to=20set=20c?=
 =?UTF-8?q?onfig.serve=5Fstatic=5Fassets=20to=20true=20in=20production=20m?=
 =?UTF-8?q?ode=20with=20WEBrick=20as=20only=20this=20includes=20ActionDisp?=
 =?UTF-8?q?atch::Static.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 railties/guides/source/configuring.textile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile
index a4cc62c117..84b5fbc73b 100644
--- a/railties/guides/source/configuring.textile
+++ b/railties/guides/source/configuring.textile
@@ -98,7 +98,7 @@ NOTE. The +config.asset_path+ configuration is ignored if the asset pipeline is
 
 * +config.secret_token+ used for specifying a key which allows sessions for the application to be verified against a known secure key to prevent tampering. Applications get +config.secret_token+ initialized to a random key in +config/initializers/secret_token.rb+.
 
-* +config.serve_static_assets+ configures Rails to serve static assets. Defaults to true, but in the production environment is turned off. The server software used to run the application should be used to serve the assets instead.
+* +config.serve_static_assets+ configures Rails itself to serve static assets. Defaults to true, but in the production environment is turned off as the server software (e.g. Nginx or Apache) used to run the application should serve static assets instead. Unlike the default setting set this to true when running (absolutely not recommended!) or testing your app in production mode using WEBrick. Otherwise you won´t be able use page caching and requests for files that exist regularly under the public directory will anyway hit your Rails app.
 
 * +config.session_store+ is usually set up in +config/initializers/session_store.rb+ and specifies what class to use to store the session. Possible values are +:cookie_store+ which is the default, +:mem_cache_store+, and +:disabled+. The last one tells Rails not to deal with sessions. Custom session stores can also be specified:
 
-- 
cgit v1.2.3


From 0fd52bb6c79f20b8dbd5c8afb774ef1dae155fc4 Mon Sep 17 00:00:00 2001
From: Ryan Bigg <radarlistener@gmail.com>
Date: Sat, 18 Jun 2011 11:16:10 +1000
Subject: Added 'Configuring Assets' section to configuring guide

---
 railties/guides/source/configuring.textile | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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

diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile
index 84b5fbc73b..ca11f757ff 100644
--- a/railties/guides/source/configuring.textile
+++ b/railties/guides/source/configuring.textile
@@ -116,8 +116,23 @@ WARNING: Threadsafe operation is incompatible with the normal workings of develo
 
 * +config.whiny_nils+ enables or disables warnings when a certain set of methods are invoked on +nil+ and it does not respond to them. Defaults to true in development and test environments.
 
+h4. Configuring Assets
+
+Rails 3.1, by default, is set up to use the +sprockets+ gem to manage assets within an application. This gem concatenates and compresses assets in order to make serving them much less painful.
+
+* +config.assets.css_compressor+ defines the CSS compressor to use. Only supported value at the moment is +:yui+, which uses the +yui-compressor+ gem.
+
 * +config.assets.enabled+ a flag that controls whether the asset pipeline is enabled. It is explicitly initialized in +config/application.rb+.
 
+* +config.assets.js_compressor+ defines the JavaScript compressor to use. Possible values are +:closure+, +:uglifier+ and +:yui+ which require the use of the +closure-compiler+, +uglifier+ or +yui-compressor+ gems respectively.
+
+* +config.assets.paths+ contains the paths which are used to look for assets. Appending paths to this configuration option will cause those paths to be used in the search for assets.
+
+* +config.assets.precompile+ allows you to specify additional assets (other than +application.css+ and +application.js+) which are to be precompiled when +rake assets:precompile+ is run.
+
+* +config.assets.prefix+ defines the prefix where assets are served from. Defaults to +/assets+.
+
+
 h4. Configuring Generators
 
 Rails 3 allows you to alter what generators are used with the +config.generators+ method. This method takes a block:
-- 
cgit v1.2.3

