requirejs-rails
requirejs-rails copied to clipboard
Provide dynamic "urlArgs" config for cache-busting
With configuration params embedded as strings into the "requirejs.yml" file (which gets loaded once when the server starts), how do you provide a dynamic urlArgs: "bust=" + Date.now() configuration param for each time a page loads? Without that param, all script files are cached by the browser and do not reflect updates during development.
Seems like this should be really simple, so I may be missing something obvious here. Thanks!
Looks like the answer is more about the RoR assets pipeline:
config.assets.cache_store = :null_store
P.S.: you can not use ruby code in .yml files without some tricks.