From 348b9824ed2882f400a5e8f966fceba7caa689d2 Mon Sep 17 00:00:00 2001 From: Thiago Pinto Date: Fri, 7 Jun 2013 00:08:36 -0400 Subject: using Model.all.find_each in rails 3 raises an error and should not be recommended --- activerecord/lib/active_record/relation/batches.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/relation/batches.rb b/activerecord/lib/active_record/relation/batches.rb index b921f2eddb..2f21b65ee4 100644 --- a/activerecord/lib/active_record/relation/batches.rb +++ b/activerecord/lib/active_record/relation/batches.rb @@ -11,7 +11,7 @@ module ActiveRecord # The #find_each method uses #find_in_batches with a batch size of 1000 (or as # specified by the +:batch_size+ option). # - # Person.all.find_each do |person| + # Person.find_each do |person| # person.do_awesome_stuff # end # @@ -50,7 +50,7 @@ module ActiveRecord # end # # # Let's process the next 2000 records - # Person.all.find_in_batches(start: 2000, batch_size: 2000) do |group| + # Person.find_in_batches(start: 2000, batch_size: 2000) do |group| # group.each { |person| person.party_all_night! } # end def find_in_batches(options = {}) -- cgit v1.2.3