diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-03-11 14:08:40 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-11 15:07:23 +0000 |
commit | 04333482bd665e4d4ced167ff4f566ecfc0cc919 (patch) | |
tree | 64c55675e3e4d25098ce648ddea0b0775f65a2e2 /activerecord/lib/active_record | |
parent | 19ad375e7afa99dc8bc5d859c478bae19c5ddc18 (diff) | |
download | rails-04333482bd665e4d4ced167ff4f566ecfc0cc919.tar.gz rails-04333482bd665e4d4ced167ff4f566ecfc0cc919.tar.bz2 rails-04333482bd665e4d4ced167ff4f566ecfc0cc919.zip |
Rename ActiveRecord::Base.each to ActiveRecord::Base.find_each
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/batches.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/batches.rb b/activerecord/lib/active_record/batches.rb index 9e9c8fbbf4..4ea932f34d 100644 --- a/activerecord/lib/active_record/batches.rb +++ b/activerecord/lib/active_record/batches.rb @@ -11,14 +11,14 @@ module ActiveRecord # # Example: # - # Person.each(:conditions => "age > 21") do |person| + # Person.find_each(:conditions => "age > 21") do |person| # person.party_all_night! # end # # Note: This method is only intended to use for batch processing of large amounts of records that wouldn't fit in # memory all at once. If you just need to loop over less than 1000 records, it's probably better just to use the # regular find methods. - def each(options = {}) + def find_each(options = {}) find_in_batches(options) do |records| records.each { |record| yield record } end |