1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #10222 from senny/update_bundler_section_in_assets_guide

docs, adjust the application.rb snippets to match the generated file.

Closes #10449
This commit is contained in:
Rafael Mendonça França 2013-05-23 13:42:05 -07:00
commit 432ffdb073

View file

@ -815,18 +815,16 @@ end
If you use the `assets` group with Bundler, please make sure that your `config/application.rb` has the following Bundler require statement:
```ruby
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
```
Instead of the old Rails 3.0 version:
Instead of the generated version:
```ruby
# If you have a Gemfile, require the gems listed there, including any gems
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
Bundler.require(:default, Rails.env)
```