Default config.assets.digests to true in development#15155
Conversation
|
Cool! Change the Gemfile to point to sprockets-rails master and we run the test suite against it. |
There was a problem hiding this comment.
No longer results in false positives thanks to rails/sprockets-rails#84.
|
Done! |
|
From a quick glance at the CI failures, it seems like there are instances in the tests that request assets without their digests and some asserts that expect the non-digested URL (e.g. expecting I'll take a look at turning off the digest flag when appropriate for some of the tests and amending the regex to include a digest for others. |
There was a problem hiding this comment.
Do we need to disable digest for this case?
There was a problem hiding this comment.
Yup, we need to disable it. We make a GET to "/assets/demo.js" which doesn't work when digests are enabled since a digest isn't included in the request URL.
|
Could you add a CHANGELOG entry? |
|
Sure. Do you mean another CHANGELOG entry in addition to the one already added to |
|
Oops, it is there already. thanks. |
Default config.assets.digests to true in development
|
Thanks @rafaelfranca and @matthewd for your help in getting this and rails/sprockets-rails#149 done! |
With rails/sprockets-rails#149, assets will only be served if the request has a digest if
config.assets.digest = trueandconfig.assets.raise_runtime_errors = true.This PR sets
config.assets.digesttotrueby default and will help users avoid hardcoding paths that work in development but break in production.