Hi all,
The subject sums up what I want to do in a nutshell. I have a collection of ActiveRecord objects (@galleries), and I want to generate from it another collection of arrays, each three elements long. This is simply so I can display preview pictures from all my @galleries in a three column table.
What I want to end up with is something like this that I can iterate over to build my table:
@collected -> [[gallery1, gallery2, gallery3], [gallery4, gallery5, gallery6]]
etc
I cannot for the life of me figure out a clean way to do it. Any hints or prods in the right direction would be great
Many thanks,
Dan