diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-04 14:22:20 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-04 14:22:29 -0700 |
commit | ec736dff7b0a05d58d4c8780863afc47e2bb74a3 (patch) | |
tree | 64fa67d95c1b53093e59fa51ea737b88a695bd9c | |
parent | 30abb01d073a5cadf1e7f38e08ba20dfe468bda0 (diff) | |
download | rails-ec736dff7b0a05d58d4c8780863afc47e2bb74a3.tar.gz rails-ec736dff7b0a05d58d4c8780863afc47e2bb74a3.tar.bz2 rails-ec736dff7b0a05d58d4c8780863afc47e2bb74a3.zip |
call to_a since we are not passing anything to all()
-rw-r--r-- | activerecord/lib/active_record/relation/batches.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/batches.rb b/activerecord/lib/active_record/relation/batches.rb index ecdf7c54b1..d7494ebb5a 100644 --- a/activerecord/lib/active_record/relation/batches.rb +++ b/activerecord/lib/active_record/relation/batches.rb @@ -73,7 +73,7 @@ module ActiveRecord break if records.size < batch_size if primary_key_offset = records.last.id - records = relation.where(primary_key.gt(primary_key_offset)).all + records = relation.where(primary_key.gt(primary_key_offset)).to_a else raise "Primary key not included in the custom select clause" end |