# Each Iterator and Tables

**URL:** <https://www.ruby-forum.com/t/each-iterator-and-tables/128136>\
**Category:** Rails\
**Created:** [February 5, 2008, 9:15am UTC](https://www.ruby-forum.com/t/each-iterator-and-tables/128136 "2008-02-05T09:15:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tktktk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a3d4f5/32.png) [@tktktk](https://www.ruby-forum.com/u/tktktk)\
**Post date:** [February 5, 2008, 9:15am UTC](https://www.ruby-forum.com/t/each-iterator-and-tables/128136/1 "2008-02-05T09:15:54Z")

</div>

Hi

I’m looking to implement a small foto album into one of my projects.  
For getting the data out of the database I’m using pictures.each do…

Is it possible to use the iterator to get me three columns of pictures  
and then break down to the next line of the table?

Picture Picture Picture  
Picture Picture Picture  
Picture Picture Picture

How would I do something like this?

Thanks for your help.  
tk

---

<div class="post-metadata">

**Author:** ![tktktk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a3d4f5/32.png) [@tktktk](https://www.ruby-forum.com/u/tktktk)\
**Post date:** [February 5, 2008, 10:45am UTC](https://www.ruby-forum.com/t/each-iterator-and-tables/128136/2 "2008-02-05T10:45:52Z")

</div>

On 5 Feb 2008, at 08:14, tk wrote:

> Hi
> 
> I’m looking to implement a small foto album into one of my projects.  
> For getting the data out of the database I’m using pictures.each do…
> 
> Is it possible to use the iterator to get me three columns of pictures  
> and then break down to the next line of the table?

in\_groups\_of ?

Fred

---

<div class="post-metadata">

**Author:** ![tktktk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a3d4f5/32.png) [@tktktk](https://www.ruby-forum.com/u/tktktk)\
**Post date:** [February 5, 2008, 11:12am UTC](https://www.ruby-forum.com/t/each-iterator-and-tables/128136/3 "2008-02-05T11:12:58Z")

</div>

that might be it, i’ll check it.
