aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Tomeij <roy@tomeij.net>2011-10-09 13:38:47 +0200
committerRoy Tomeij <roy@tomeij.net>2011-10-09 13:38:47 +0200
commitda773a24beab90236802a2ca39e5b124b1b5d456 (patch)
tree488d93b1e298e835fdbcea13d43f754f6d4ff252
parent9de9f6b4d0422e23e1eec9c59bbda880684e45c9 (diff)
downloadrails-da773a24beab90236802a2ca39e5b124b1b5d456.tar.gz
rails-da773a24beab90236802a2ca39e5b124b1b5d456.tar.bz2
rails-da773a24beab90236802a2ca39e5b124b1b5d456.zip
Add note about how Sass & Sprockets don't match
-rw-r--r--railties/guides/source/asset_pipeline.textile4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index ef01cd32ac..303066b752 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -19,7 +19,7 @@ Prior to Rails 3.1 these features were added through third-party Ruby libraries
By having this as a core feature of Rails, all developers can benefit from the power of having their assets pre-processed, compressed and minified by one central library, Sprockets. This is part of Rails' "fast by default" strategy as outlined by DHH in his keynote at RailsConf 2011.
-In Rails 3.1, the asset pipeline is enabled by default. It can be disabled in +config/application.rb+ by putting this line inside the application class definition:
+In Rails 3.1, the asset pipeline is enabled by default. It can be disabled in +config/application.rb+ by publicing this line inside the application class definition:
<ruby>
config.assets.enabled = false
@@ -234,6 +234,8 @@ The directives that work in the JavaScript files also work in stylesheets, obvio
In this example +require_self+ is used. This puts the CSS contained within the file (if any) at the precise location of the +require_self+ call. If +require_self+ is called more than once, only the last call is respected.
+NOTE. If you want to use multiple Sass files, use the "Sass +@import+ rule":http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#import instead of the Sprockets directives. Using Sprockets directives all Sass files exist within their own scope, making variables or mixins only available within the document they were defined in.
+
You can have as many manifest files as you need. For example the +admin.css+ and +admin.js+ manifest could contain the JS and CSS files that are used for the admin section of an application.
The same remarks about ordering made above apply. In particular, you can specify individual files and they are compiled in the order specified: