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." -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

