I'm trying to display a objects in my model in the form of a table, but am having a hard time trying to create the rows and columns dynamically.
I have a model called Pictures and currently I'm displaying all of them in a looooong list.
<% for picture in @pictures %>
<p><%= image_tag(picture.url) %></p>
<% end %>
How can I turn this into a table in the view with rails?
<table>
<tr>
<% for picture in @pictures %>
<td>
<%= image_tag(picture.url) %>
</td>
** Here's where I'm confused..How can I write after 6 cells create a new row?? *****
<% end %>
</table>
So the question is really related to how to breakup this type of data within the view.