module AssetsPipeline::AssetUrlHelper
Public Instance Methods
compute_asset_path(path, options = {})
click to toggle source
Calls superclass method
# File lib/assets_pipeline/asset_url_helper.rb, line 3 def compute_asset_path(path, options = {}) asset_path_from_manifest(clean_path(super)) end
Private Instance Methods
asset_path_from_manifest(asset_path)
click to toggle source
# File lib/assets_pipeline/asset_url_helper.rb, line 9 def asset_path_from_manifest(asset_path) config = Rails.application.config rev_path = config.assets_pipeline.manifest[asset_path] || asset_path [config.assets_pipeline.prefix, rev_path].join('/') end
clean_path(path)
click to toggle source
# File lib/assets_pipeline/asset_url_helper.rb, line 16 def clean_path(path) path.split('/').select(&:present?).join('/') end