Suppose the query customer_list = Customers.where ("state = ?", 'CA').order('first_name ASC')
returns 30 customers, and the field .first_name has their first name.
I want to display their names in an html table with 3 more or less equal columns, eg, I want to fill the table as I go, wrapping to a new row each 3rd value.
Aaron Amy Andy
Arny Beth Bill
Bob Carl Charlie
etc etc
What is the 'ruby way' to flow the records into such a table's cells?
I could use .find_in_batches to grab 3 at a time, then iterate through the three for each column, but I suspect that's not the elegant ruby way.