X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2afb1242ccc1898f42e73a060fe237e8f033dbf2..c661bbf7dba69d265ebcd6431d0a4ab8c5d48430:/app/helpers/asset_helper.rb?ds=sidebyside diff --git a/app/helpers/asset_helper.rb b/app/helpers/asset_helper.rb index 67c1a141d..40782fbcf 100644 --- a/app/helpers/asset_helper.rb +++ b/app/helpers/asset_helper.rb @@ -1,11 +1,7 @@ module AssetHelper def assets(directory) - assets = {} - - Rails.application.assets.index.each_logical_path("#{directory}/*") do |path| - assets[path.sub(/^#{directory}\//, "")] = asset_path(path) + Rails.application.assets_manifest.assets.keys.each_with_object({}) do |asset, assets| + assets[asset] = asset_path(asset) if asset.start_with?("#{directory}/") end - - assets end end