mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-25 01:23:23 +00:00
7 lines
279 B
Plaintext
7 lines
279 B
Plaintext
- if variant.product.images.length == 0
|
|
= image_tag("/noimage/mini.png")
|
|
- else
|
|
- # A Rails bug makes it necessary to call `main_app.url_for` here.
|
|
- # https://github.com/rails/rails/issues/31325
|
|
= image_tag(main_app.url_for(variant.product.images.first.variant(:mini)))
|