diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-03 19:18:34 -0300 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:28 -0700 |
commit | ab6b61e34c046da944d9b517876a032fe3d0a8a1 (patch) | |
tree | ae4e61e2561e491bcd6517abee1314debf12db25 /railties/lib/rails | |
parent | a9b2634a3c31a8c2d15cf63147aa663aea851b06 (diff) | |
download | rails-ab6b61e34c046da944d9b517876a032fe3d0a8a1.tar.gz rails-ab6b61e34c046da944d9b517876a032fe3d0a8a1.tar.bz2 rails-ab6b61e34c046da944d9b517876a032fe3d0a8a1.zip |
Don't require assets group in production by default, you can change this default in the application.rb anyways
Diffstat (limited to 'railties/lib/rails')
-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 |