diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-03 19:18:34 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-03 19:20:08 -0300 |
commit | bf5d1d46623d478bb4371a60bead97022cef11ed (patch) | |
tree | 85a1162fd413ace80e86a5c410735a1e402be27c | |
parent | 8962e96e3926a0c8d11d57eb583d5879dab0637c (diff) | |
download | rails-bf5d1d46623d478bb4371a60bead97022cef11ed.tar.gz rails-bf5d1d46623d478bb4371a60bead97022cef11ed.tar.bz2 rails-bf5d1d46623d478bb4371a60bead97022cef11ed.zip |
Don't require assets group in production by default, you can change this default in the application.rb anyways
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb | 10 |
1 files changed, 7 insertions, 3 deletions
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 7687b1beac..dd0cf64650 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -13,9 +13,13 @@ require "active_resource/railtie" <% end -%> # If you have a Gemfile, require the default gems, the ones in the -# current environment and also include :assets gems if in development -# or test environments. -Bundler.require *Rails.groups(:assets) if defined?(Bundler) +# current environment and also include :assets gems if you ... +if defined?(Bundler) + # ... precompile your assets + Bundler.require *Rails.groups(:assets => %w(development test)) + # ... want your assets to be lazily compiled also in production + # Bundler.require(:default, :assets, Rails.env) +end module <%= app_const_base %> class Application < Rails::Application |