aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/asset_pipeline.md
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2012-12-07 23:20:35 -0800
committerSteve Klabnik <steve@steveklabnik.com>2012-12-07 23:20:35 -0800
commited78770b1a13788a5d3fcae484f34654de580bd5 (patch)
treeacbfe5c166ae76a4bb3580e747d44dff9d867db8 /guides/source/asset_pipeline.md
parente618adbcabe59eaccfab1f721eb3cf1e915e012e (diff)
downloadrails-ed78770b1a13788a5d3fcae484f34654de580bd5.tar.gz
rails-ed78770b1a13788a5d3fcae484f34654de580bd5.tar.bz2
rails-ed78770b1a13788a5d3fcae484f34654de580bd5.zip
Remove references to Rails versions.
There's no reason for guides to reference old behaviors. They should be current as of the versions of Rails that they ship with, and including older information just clutters thing. I discussed this change with @fxn and he agrees.
Diffstat (limited to 'guides/source/asset_pipeline.md')
-rw-r--r--guides/source/asset_pipeline.md10
1 files changed, 3 insertions, 7 deletions
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md
index ee79d291d3..ff6787dae5 100644
--- a/guides/source/asset_pipeline.md
+++ b/guides/source/asset_pipeline.md
@@ -1,7 +1,7 @@
The Asset Pipeline
==================
-This guide covers the asset pipeline introduced in Rails 3.1.
+This guide covers the asset pipeline.
After reading this guide, you will know:
@@ -18,11 +18,9 @@ What is the Asset Pipeline?
The asset pipeline provides a framework to concatenate and minify or compress JavaScript and CSS assets. It also adds the ability to write these assets in other languages such as CoffeeScript, Sass and ERB.
-Prior to Rails 3.1 these features were added through third-party Ruby libraries such as Jammit and Sprockets. Rails 3.1 is integrated with Sprockets through Action Pack which depends on the `sprockets` gem, by default.
-
Making the asset pipeline a core feature of Rails means that 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:
+The asset pipeline is enabled by default. It can be disabled in `config/application.rb` by putting this line inside the application class definition:
```ruby
config.assets.enabled = false
@@ -287,8 +285,6 @@ For example, a new Rails application includes a default `app/assets/javascripts/
In JavaScript files, the directives begin with `//=`. In this case, the file is using the `require` and the `require_tree` directives. The `require` directive is used to tell Sprockets the files that you wish to require. Here, you are requiring the files `jquery.js` and `jquery_ujs.js` that are available somewhere in the search path for Sprockets. You need not supply the extensions explicitly. Sprockets assumes you are requiring a `.js` file when done from within a `.js` file.
-NOTE. In Rails 3.1 the `jquery-rails` gem provides the `jquery.js` and `jquery_ujs.js` files via the asset pipeline. You won't see them in the application tree.
-
The `require_tree` directive tells Sprockets to recursively include _all_ JavaScript files in the specified directory into the output. These paths must be specified relative to the manifest file. You can also use the `require_directory` directive which includes all JavaScript files only in the directory specified, without recursion.
Directives are processed top to bottom, but the order in which files are included by `require_tree` is unspecified. You should not rely on any particular order among those. If you need to ensure some particular JavaScript ends up above some other in the concatenated file, require the prerequisite file first in the manifest. Note that the family of `require` directives prevents files from being included twice in the output.
@@ -665,7 +661,7 @@ This can be changed to something else:
config.assets.prefix = "/some_other_path"
```
-This is a handy option if you are updating an existing project (pre Rails 3.1) that already uses this path or you wish to use this path for a new resource.
+This is a handy option if you are updating an older project that didn't use the asset pipeline and that already uses this path or you wish to use this path for a new resource.
### X-Sendfile Headers