module RailsExternalAssetPipeline::ComputeAssetPath

Constants

TYPES_WITH_MANIFEST

Public Instance Methods

compute_asset_path(source, options = {}) click to toggle source
# File lib/rails_external_asset_pipeline/compute_asset_path.rb, line 7
def compute_asset_path(source, options = {})
  if TYPES_WITH_MANIFEST.include? options[:type]
    manifest = Manifest.new(manifests_path, options[:type])
    manifest.fetch(source)
  else
    source
  end
end
manifests_path() click to toggle source
# File lib/rails_external_asset_pipeline/compute_asset_path.rb, line 16
def manifests_path
  Rails.configuration.x.rails_external_asset_pipeline.manifests_path ||
    File.join("public", "assets", "manifests")
end