Files
openfoodnetwork/app/views/shopping_shared/_header.html.haml
Maikel Linke 4facab0335 Guard against invariable file types
Australian production had one JPG image which was not recognised as
such. The `content_type` was missing and trying to generate a URL for a
variant raised an error and crashed the page.

Testing for `variable?` includes testing for `attached?` and is more
defensive.
2022-06-01 17:16:55 +10:00

13 lines
418 B
Plaintext

- distributor = @order&.distributor || current_distributor
%navigation
%distributor.details.row
.small-12.medium-12.large-8.columns
#distributor_title
- if distributor.logo.variable?
= image_tag distributor.logo_url(:thumb), class: "left"
= render DistributorTitleComponent.new(name: distributor.name)
%location= distributor.address.city
= yield :ordercycle_sidebar