class InlineSvg::StaticAssetFinder
def self.find_asset(filename)
def self.find_asset(filename) new(filename) end
def initialize(filename)
def initialize(filename) @filename = filename end
def pathname
def pathname if ::Rails.application.config.assets.compile asset = ::Rails.application.assets[@filename] Pathname.new(asset.filename) if asset.present? else manifest = ::Rails.application.assets_manifest asset_path = manifest.assets[@filename] unless asset_path.nil? ::Rails.root.join(manifest.directory, asset_path) end end end