Marnen Laibow-Koser wrote: > > There's also in_groups_of. > > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org
I'd forgotten about that method. In addition, you can each_slice(integer) to divide an array. Though, 'enumerator' is required in your Active Record model. I would recommend this approach if you're splitting arrays into columns or rows. Else, batch_size and in_groups_of are useful for retrieving large data sets. -- 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.