@tomhughes commented on this pull request.
> @@ -2,8 +2,20 @@
module AssetHelper
def assets(directory)
- Rails.application.assets_manifest.assets.keys.each_with_object({}) do
|asset, assets|
- assets[asset] = asset_path(asset) if asset.start_with?("#{directory}/")
+ if (manifest = Rails.application.assets_manifest.assets) &&
!manifest.empty?
+ # With precompiled assets
+ manifest.keys.each_with_object({}) do |asset, assets|
+ assets[asset] = asset_path(asset) if asset.start_with?("#{directory}/")
+ end
+ elsif (env = Rails.application.assets) && env.present?
When will this not be present?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6856#pullrequestreview-3888371457
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6856/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev