X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2afb1242ccc1898f42e73a060fe237e8f033dbf2..c8e1b3c6623b96f5a99dcc4202d28fec1bd0ba6a:/app/helpers/asset_helper.rb 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