aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2011-06-18 11:16:10 +1000
committerRyan Bigg <radarlistener@gmail.com>2011-06-18 11:16:10 +1000
commit0fd52bb6c79f20b8dbd5c8afb774ef1dae155fc4 (patch)
treecc1864c79095f583dd95105362dc5e6d4e7feb34 /railties/guides
parent030950a7ee67d8e525ee39c6d53e18b762303f37 (diff)
downloadrails-0fd52bb6c79f20b8dbd5c8afb774ef1dae155fc4.tar.gz
rails-0fd52bb6c79f20b8dbd5c8afb774ef1dae155fc4.tar.bz2
rails-0fd52bb6c79f20b8dbd5c8afb774ef1dae155fc4.zip
Added 'Configuring Assets' section to configuring guide
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/configuring.textile15
1 files changed, 15 insertions, 0 deletions
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: