Using javascript_url, we can get the asset url:
<script src="<%= javascript_url 'company_widget' %>"
token="<%= current_user.token %>"
class="ofri-company-widget"
></script>
However, it javascript_urlreturns the URL with the fingerprint:
domain.com/assets/company_widget-<fingerprint>.js
This seems to be cached forever, and whenever we need to make changes to a script, third-party users using this script will have to reload it.
I noticed that accessing the file without fingerprints also works:
domain.com/assets/company_widget.js
Is there any way to say javascript_urlnot to add a fingerprint? Or is there another better solution in this context?
source
share