I want to generate a table of images, something like:

<I> <I> <I>
<I> <I> <I>

So I've to put a <br> after 3 iterations, how should I do this?

I could make a counter initialize it on zero, increment its value and
check it for "mod3=0", but I think there might be a better way to do it
in ruby?

I've something like:

<% @games.each do |game| %>

    <%= link_to image_tag(game.image.url), game %>

<% end %>

Regards,
Joris
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to