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

Move default to different initializer

Is this usage correct? cc/ @prathamesh-sonpatki
This commit is contained in:
schneems 2016-08-25 12:29:54 -05:00
parent a7256c30ae
commit 58bd1124cf
3 changed files with 4 additions and 16 deletions

View file

@ -1444,18 +1444,6 @@ config.public_file_server.headers = {
}
```
### config/initializers/assets.rb
In the most recent verison of sprockets-rails there is a flag available to configure what happens when
an asset lookup is performed and no asset is found. By setting this value to false, an error will be
raised so the asset lookup does not fail silently.
```ruby
# Unknown asset fallback will return the path passed in when the given
# asset is not present in the asset pipeline.
Rails.application.config.assets.unknown_asset_fallback = false
```
### config/initializers/wrap_parameters.rb
Add this file with the following contents, if you wish to wrap parameters into a nested hash. This is on by default in new applications.

View file

@ -6,10 +6,6 @@ Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Unknown asset fallback will return the path passed in when the given
# asset is not present in the asset pipeline.
Rails.application.config.assets.unknown_asset_fallback = false
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.

View file

@ -32,3 +32,7 @@ ActiveSupport.halt_callback_chains_on_return_false = <%= options[:update] ? true
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
Rails.application.config.ssl_options = { hsts: { subdomains: true } }
<%- end -%>
# Unknown asset fallback will return the path passed in when the given
# asset is not present in the asset pipeline.
Rails.application.config.assets.unknown_asset_fallback = false