Use the RAILS_ASSET_ID environment variable or the source’s modification time as its cache-busting asset id.
Source Code
# File action_view/helpers/asset_tag_helper.rb, line 495 def rails_asset_id(source) if asset_id = ENV["RAILS_ASSET_ID"] asset_id else path = File.join(ASSETS_DIR, source) if File.exist?(path) File.mtime(path).to_i.to_s else '' end end end
<code/>and<pre/>for code samples.