diff options
author | Eileen M. Uchitelle <eileencodes@gmail.com> | 2016-08-19 16:52:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-19 16:52:16 -0400 |
commit | 01a8e0c24ea1c24f288c3029e12a9cdf6b56b3bb (patch) | |
tree | aa78df57f9c8478f11aa79cb62c53f9396c0e13b /guides/source | |
parent | c1d612cf5a9d25133ab50cc057ebb35d337e37fa (diff) | |
parent | b4c92be4711cdaa5ba8f49bd46a7962c12d78633 (diff) | |
download | rails-01a8e0c24ea1c24f288c3029e12a9cdf6b56b3bb.tar.gz rails-01a8e0c24ea1c24f288c3029e12a9cdf6b56b3bb.tar.bz2 rails-01a8e0c24ea1c24f288c3029e12a9cdf6b56b3bb.zip |
Merge pull request #26224 from jonatack/consistent-asset-precompile-examples
Consistent examples and template for assets#precompile
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/3_1_release_notes.md | 2 | ||||
-rw-r--r-- | guides/source/asset_pipeline.md | 10 | ||||
-rw-r--r-- | guides/source/engines.md | 2 | ||||
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/guides/source/3_1_release_notes.md b/guides/source/3_1_release_notes.md index feee0f9920..fd90cf9886 100644 --- a/guides/source/3_1_release_notes.md +++ b/guides/source/3_1_release_notes.md @@ -99,7 +99,7 @@ gem 'jquery-rails' # config.assets.manifest = YOUR_PATH # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile `= %w( search.js ) + # config.assets.precompile `= %w( admin.js admin.css ) # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md index e6631a513c..5c085002ce 100644 --- a/guides/source/asset_pipeline.md +++ b/guides/source/asset_pipeline.md @@ -724,7 +724,7 @@ If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the `precompile` array in `config/initializers/assets.rb`: ```ruby -Rails.application.config.assets.precompile += ['admin.js', 'admin.css', 'swfObject.js'] +Rails.application.config.assets.precompile += %w( admin.js admin.css ) ``` NOTE. Always specify an expected compiled filename that ends with .js or .css, @@ -1109,9 +1109,9 @@ Windows you have a JavaScript runtime installed in your operating system. ### Serving GZipped version of assets -By default, gzipped version of compiled assets will be generated, along -with the non-gzipped version of assets. Gzipped assets help reduce the transmission of -data over the wire. You can configure this by setting the `gzip` flag. +By default, gzipped version of compiled assets will be generated, along with +the non-gzipped version of assets. Gzipped assets help reduce the transmission +of data over the wire. You can configure this by setting the `gzip` flag. ```ruby config.assets.gzip = false # disable gzipped assets generation @@ -1291,7 +1291,7 @@ config.assets.digest = true # Precompile additional assets (application.js, application.css, and all # non-JS/CSS are already added) -# config.assets.precompile += %w( search.js ) +# config.assets.precompile += %w( admin.js admin.css ) ``` Rails 4 and above no longer set default config values for Sprockets in `test.rb`, so diff --git a/guides/source/engines.md b/guides/source/engines.md index f9a37e45ac..d6118c014f 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -1364,7 +1364,7 @@ You can define assets for precompilation in `engine.rb`: ```ruby initializer "blorgh.assets.precompile" do |app| - app.config.assets.precompile += %w(admin.css admin.js) + app.config.assets.precompile += %w( admin.js admin.css ) end ``` diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index a8afa0ca6e..2372590cec 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -1426,7 +1426,7 @@ config.assets.digest = true # config.assets.manifest = YOUR_PATH # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) -# config.assets.precompile += %w( search.js ) +# config.assets.precompile += %w( admin.js admin.css ) # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true |