Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fingerprint for erb appended assets #377

Closed
ysyyork opened this issue Sep 3, 2016 · 1 comment
Closed

Fingerprint for erb appended assets #377

ysyyork opened this issue Sep 3, 2016 · 1 comment

Comments

@ysyyork
Copy link

ysyyork commented Sep 3, 2016

My use case is, I have a js config file which will use rails setting variables. So I embedded a ruby statement in my js file and append the file with .erb extension. It works well for the first time, but when I change the variables, this js file cannot be re compiled, or technically it re compiled with the same fingerprint digest and when serving to browser, browser find the digest is the same as the cached one so it only uses the cached version which is not actually up to date.

Expected behavior

js file with erb extension should be re compiled and the fingerprint should be different based on the content of the embedded variable. If I have such a sentence in the code <%= ENV['MY_SETTING'] %>, when the actual MY_SETTING variable changes, the fingerprint digest should also change.

Actual behavior

The digest does not change even if the MY_SETTING variable changes.

System configuration

  • sprockets-rails 3.1.1
  • ruby 2.2.1p85
@ysyyork
Copy link
Author

ysyyork commented Sep 3, 2016

Find the same issue here #366, I will close this. Thanks

@ysyyork ysyyork closed this as completed Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant