Skip to content

Commit

Permalink
Edited railties/guides/source/asset_pipeline.textile via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-stewart committed Jun 18, 2011
1 parent 38aa153 commit 0a45e24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/guides/source/asset_pipeline.textile
Expand Up @@ -77,7 +77,7 @@ For example, in the default Rails application there's a +app/assets/javascripts/
//= require_tree .
</plain>

In JS files, directives begin with +//=+. In this case, the file is using the +require+ directive twice and the +require_tree+ directive once. The +require+ directive tells Sprockets that we would like to require a file called +jquery.js+ that is available somewhere in the search path for Sprockets. By default, this is located inside the +vendor/assets/javascripts+ directory contained within the +jquery_rails+ gem. An identical event takes place for the +jquery_ujs+ require specified here also.
In JS files, directives begin with +//=+. In this case, the file is using the +require+ directive twice and the +require_tree+ directive once. The +require+ directive tells Sprockets that we would like to require a file called +jquery.js+ that is available somewhere in the search path for Sprockets. By default, this is located inside the +vendor/assets/javascripts+ directory contained within the +jquery-rails+ gem. An identical event takes place for the +jquery_ujs+ require specified here also.

The +require_tree .+ directive tells Sprockets to include _all_ JavaScript files in this directory into the output. A path relative to the file can be specified if only certain files are required to be loaded.

Expand Down

0 comments on commit 0a45e24

Please sign in to comment.