Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v3.2.13) is shown here.
rails_asset_id(source)
private
Use the RAILS_ASSET_ID environment variable or the source’s modification
time as its cache-busting asset id.
# File actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb, line 71
def rails_asset_id(source)
if asset_id = ENV["RAILS_ASSET_ID"]
asset_id
else
if self.cache_asset_ids && (asset_id = self.asset_ids_cache[source])
asset_id
else
path = File.join(config.assets_dir, source)
asset_id = File.exist?(path) ? File.mtime(path).to_i.to_s : ''
if self.cache_asset_ids
add_to_asset_ids_cache(source, asset_id)
end
asset_id
end
end
end