Skip to content

Commit 56800c8

Browse files
committed
Precompile configuration now lives in an initializer
Update the error message to match rails/rails#14689. Even if the user doesn't currently have this initializer, they can safely create it with the supplied content, and all will be good.
1 parent 5318f46 commit 56800c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/sprockets/rails/helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def raise_runtime_errors
2424
class AssetFilteredError < StandardError
2525
def initialize(source)
2626
msg = "Asset filtered out and will not be served: " <<
27-
"add `config.assets.precompile += %w( #{source} )` " <<
28-
"to `config/application.rb` and restart your server"
27+
"add `Rails.application.config.assets.precompile += %w( #{source} )` " <<
28+
"to `config/initializers/assets.rb` and restart your server"
2929
super(msg)
3030
end
3131
end

0 commit comments

Comments
 (0)