I'm trying to make my own site and I don't know how to better dispay images from database. I want to display six images in one row, but the next six item I want to display in second row. How can I make it with this code?
<table width="80%">
<% @products.each do |product| %>
<td>
<%= product.price %>"> <%= image_tag(product.image_url) %> </td>
<% end %>
</table>
Sorry, if this question is really stupid. But I'm just learning and It will help me understand Ruby better.
Aucun commentaire:
Enregistrer un commentaire