Permalink
Browse files

Make `ActiveRecord::Batches#find_each` to not return `self`.

This caused that `find_each` was producing extra db call taking all the records from db, and was less efficient than `ActiveRecord::Base#all`.
  • Loading branch information...
1 parent bb498a5 commit 9ddf6998c90a26e592677a66ad432bb12e359291 @knapo committed May 25, 2011
Showing with 0 additions and 2 deletions.
  1. +0 −2 activerecord/lib/active_record/relation/batches.rb
@@ -20,8 +20,6 @@ def find_each(options = {})
find_in_batches(options) do |records|
records.each { |record| yield record }
end
-
- self
end
# Yields each batch of records that was found by the find +options+ as

0 comments on commit 9ddf699

Please sign in to comment.