X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9a9b045372a6f48420a9a6dacfde52c34ab7abce..970e1a99d7dce64f0631e88c5b9f060fb48d75fe:/app/helpers/asset_helper.rb?ds=inline diff --git a/app/helpers/asset_helper.rb b/app/helpers/asset_helper.rb index 5b0740735..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(%r{^#{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