提交 58bd1124 编写于 作者: S schneems

Move default to different initializer

Is this usage correct? cc/ @prathamesh-sonpatki
上级 a7256c30
......@@ -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.
......
......@@ -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.
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册