Rails: For each 3 records do

Viewed 256

I'm currently learning rails. I'm trying to figure out the following:

<% @obj.{For each 3 records} do |records| %>

<%end %>

How would I implement this "for each 3 records"?

What am I trying to do? I would like to display data in 3 columns. Therefore I'm using a table. Each record is a table data (<td><td>). After each 3 record I would need to print a <tr></tr>.

Many thanks for your help

4 Answers
Related