aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/asset_pipeline.md
diff options
context:
space:
mode:
authorZoltan Debre <zdebre@gmail.com>2013-04-23 14:10:18 +0200
committerZoltan Debre <zdebre@gmail.com>2013-04-23 14:10:18 +0200
commitbdce0c0bb10da18de955a9af5cb2bcadbc255f7b (patch)
tree0036a5887492d5e82307362bdbe4cdc6ca5f62fc /guides/source/asset_pipeline.md
parente1df81c2050fee6758eaad073bc56795cfc9f467 (diff)
downloadrails-bdce0c0bb10da18de955a9af5cb2bcadbc255f7b.tar.gz
rails-bdce0c0bb10da18de955a9af5cb2bcadbc255f7b.tar.bz2
rails-bdce0c0bb10da18de955a9af5cb2bcadbc255f7b.zip
Update assets_pipeline with config.assets.precompile location
rake assets:precompile will work if config.assets.precompile is in config/application.rb and not in config/environment/production.rb
Diffstat (limited to 'guides/source/asset_pipeline.md')
-rw-r--r--guides/source/asset_pipeline.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md
index 54548c5a0b..85301f69bc 100644
--- a/guides/source/asset_pipeline.md
+++ b/guides/source/asset_pipeline.md
@@ -450,7 +450,7 @@ The default matcher for compiling files includes `application.js`, `application.
NOTE. The matcher (and other members of the precompile array; see below) is applied to final compiled file names. This means that anything that compiles to JS/CSS is excluded, as well as raw JS/CSS files; for example, `.coffee` and `.scss` files are **not** automatically included as they compile to JS/CSS.
-If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the `precompile` array:
+If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the `precompile` array in `config/application.rb`:
```ruby
config.assets.precompile += ['admin.js', 'admin.css', 'swfObject.js']
@@ -459,7 +459,7 @@ config.assets.precompile += ['admin.js', 'admin.css', 'swfObject.js']
Or you can opt to precompile all assets with something like this:
```ruby
-# config/environments/production.rb
+# config/application.rb
config.assets.precompile << Proc.new do |path|
if path =~ /\.(css|js)\z/
full_path = Rails.application.assets.resolve(path).to_path