Permalink
Browse files

using Model.all.find_each in rails 3 raises an error and should not b…

…e recommended
  • Loading branch information...
1 parent 0435d0e commit 348b9824ed2882f400a5e8f966fceba7caa689d2 @thejamespinto thejamespinto committed Jun 7, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/relation/batches.rb
@@ -11,7 +11,7 @@ module Batches
# 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 @@ def find_each(options = {})
# 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 = {})

0 comments on commit 348b982

Please sign in to comment.