@hlfan 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?
If I interpreted it correctly, the env should not be available in a production
setup.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6856#discussion_r2883697845
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