diff options
author | Thiago Pinto <tapgyn@gmail.com> | 2013-06-07 00:08:36 -0400 |
---|---|---|
committer | Thiago Pinto <tapgyn@gmail.com> | 2013-06-07 00:08:36 -0400 |
commit | 348b9824ed2882f400a5e8f966fceba7caa689d2 (patch) | |
tree | eaa0bd23364f04b0e16b2df59afbd4b37b067842 /activerecord | |
parent | 0435d0ebcc7a31d19b9b7b8eb3c5b8afd22212a1 (diff) | |
download | rails-348b9824ed2882f400a5e8f966fceba7caa689d2.tar.gz rails-348b9824ed2882f400a5e8f966fceba7caa689d2.tar.bz2 rails-348b9824ed2882f400a5e8f966fceba7caa689d2.zip |
using Model.all.find_each in rails 3 raises an error and should not be recommended
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/batches.rb | 4 |
1 files 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 = {}) |