Pale Horse wrote: > Greg Ma wrote: >> Hi, >> I've read a few days ago that rails has a each method that allows you to >> speficy the number of iteration. I think the default number was 1000. >> What is the name of the method? >> >> myList.each_with_something or myList.each_something >> >> Greg > > You can specify the batch_size as an option to a find_each method. Batch > methods should be used when your request retrieves large amounts of > data: > > "When processing large numbers of records, it's often a good idea to do > so in batches to prevent memory ballooning."
There's also in_groups_of. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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.