@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?

It does appear to be set in production but I guess it doesn't really matter if 
we test it.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6856#discussion_r2886028755
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

Reply via email to