aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-02-20 15:48:54 +0100
committerYves Senn <yves.senn@gmail.com>2013-02-20 15:53:37 +0100
commit304f4d4c25ccabdbf97d37dd7a92a54d0b63a9c9 (patch)
treeb04e3f00c07e7705b716df01a33966b6b7245f7a
parentebae71a67a6c4d0421efd932b2af88c48b8b1c7c (diff)
downloadrails-304f4d4c25ccabdbf97d37dd7a92a54d0b63a9c9.tar.gz
rails-304f4d4c25ccabdbf97d37dd7a92a54d0b63a9c9.tar.bz2
rails-304f4d4c25ccabdbf97d37dd7a92a54d0b63a9c9.zip
move config.assets.precompile into config/application.rb
-rw-r--r--railties/CHANGELOG.md6
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/application.rb4
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt6
3 files changed, 10 insertions, 6 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 85069fbd9a..0cd599c08a 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,5 +1,11 @@
## Rails 4.0.0 (unreleased) ##
+* The configuration option `config.assets.precompile` is no longer
+ in `config/environments/production.rb` but in
+ `config/application.rb`.
+
+ *Yves Senn*
+
* Add notice message for destroy action in scaffold generator.
*Rahul P. Chaudhari*
diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb
index daf399a538..1275bce7e6 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/application.rb
+++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb
@@ -31,6 +31,10 @@ module <%= app_const_base %>
# Disable the asset pipeline.
config.assets.enabled = false
+<% else %>
+ # Precompile additional assets.
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
+ # config.assets.precompile += %w( search.js )
<% end -%>
end
end
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
index 0ab91d9864..1f0111368b 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
@@ -59,12 +59,6 @@
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
- <%- unless options.skip_sprockets? -%>
- # Precompile additional assets.
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
- # config.assets.precompile += %w( search.js )
- <%- end -%>
-
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false