I have here four images, what I want if one of those images are empty to not showing it as missing. here's an image to explain more
<% [@car.image.url, @car.image2.url, @car.image3.url, @car.image4.url].each do |image| %>
<%= link_to "javascript:void(0)", data: { image: image, zoom_image: image } do %>
<%= image_tag image%>
<% end %>
<% end %>
Aucun commentaire:
Enregistrer un commentaire