From 3105642a5ca5648337a4142e35995c06fd37557e Mon Sep 17 00:00:00 2001 From: schneems Date: Tue, 23 Aug 2016 13:03:11 -0500 Subject: [ci skip] Upgrading assets.unknown_asset_fallback --- guides/source/upgrading_ruby_on_rails.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'guides/source') diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 2372590cec..4530990280 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -1444,6 +1444,18 @@ 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. -- cgit v1.2.3