diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-29 06:10:44 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 06:10:44 +0900 |
commit | 8fb8067cfff7b197864b04380e9d1f9be0c7d06c (patch) | |
tree | 49211d3e293db1725eb005ed8d11268a9997de5e /guides | |
parent | a88eb9087260cca256c6faba40bf538d4a0289b3 (diff) | |
parent | 091806388a757b30c85b5888dabc3f705af440ef (diff) | |
download | rails-8fb8067cfff7b197864b04380e9d1f9be0c7d06c.tar.gz rails-8fb8067cfff7b197864b04380e9d1f9be0c7d06c.tar.bz2 rails-8fb8067cfff7b197864b04380e9d1f9be0c7d06c.zip |
Merge pull request #31816 from composerinteralia/jquery-references
Remove out-of-date references to jQuery [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/asset_pipeline.md | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md index e6d5aed135..618896d458 100644 --- a/guides/source/asset_pipeline.md +++ b/guides/source/asset_pipeline.md @@ -22,8 +22,7 @@ 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 and pre-processors such as CoffeeScript, Sass and ERB. It allows assets in your application to be automatically combined with assets -from other gems. For example, jquery-rails includes a copy of jquery.js -and enables AJAX features in Rails. +from other gems. The asset pipeline is implemented by the [sprockets-rails](https://github.com/rails/sprockets-rails) gem, @@ -1205,10 +1204,10 @@ Adding Assets to Your Gems Assets can also come from external sources in the form of gems. -A good example of this is the `jquery-rails` gem which comes with Rails as the -standard JavaScript library gem. This gem contains an engine class which -inherits from `Rails::Engine`. By doing this, Rails is informed that the -directory for this gem may contain assets and the `app/assets`, `lib/assets` and +A good example of this is the `jquery-rails` gem. +This gem contains an engine class which inherits from `Rails::Engine`. +By doing this, Rails is informed that the directory for this +gem may contain assets and the `app/assets`, `lib/assets` and `vendor/assets` directories of this engine are added to the search path of Sprockets. @@ -1244,11 +1243,7 @@ moving the files from `public/` to the new locations. See [Asset Organization](#asset-organization) above for guidance on the correct locations for different file types. -Next will be avoiding duplicate JavaScript files. Since jQuery is the default -JavaScript library from Rails 3.1 onwards, you don't need to copy `jquery.js` -into `app/assets` and it will be included automatically. - -The third is updating the various environment files with the correct default +Next is updating the various environment files with the correct default options. In `application.rb`: |