On Jun 6, 5:53 pm, Neil H. [email protected]
I searched around the forums for an answer to this question, but most
seemed to deal with structures and functionality that are a little
farther beyond what I am looking for.
Given that a data set (say, @results), how would you display those
results in a simple grid that is 5 items across and as many down as it
needs to be.
Thanks in advance for help with what seems to be an elusive but simple
Without looking into the problem, I think I would draw 5 tables. Like
split_count = @result.size / 5
split_counter = 0
@result.each do |result|
<% split_counter++ %>
make a table and then begin a new table after split_counter has
<% split_counter = 0 if split_counter == split_count %>
Beware when result.size is < 5 of course.
just from the top of my head, there might very well be a better