diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-07-27 17:55:43 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-07-27 17:55:43 +0100 |
commit | d1099540aff6cf00f31dafbbceed1f9fc48780a2 (patch) | |
tree | 1059bf064644bf1fa5adf36ddeccae774804dc75 /activerecord/lib/active_record/relation/batches.rb | |
parent | b658cf1198bbeb0fb702cd10c6f491cd90cedba0 (diff) | |
download | rails-d1099540aff6cf00f31dafbbceed1f9fc48780a2.tar.gz rails-d1099540aff6cf00f31dafbbceed1f9fc48780a2.tar.bz2 rails-d1099540aff6cf00f31dafbbceed1f9fc48780a2.zip |
Deprecate Relation#all.
It has been moved to active_record_deprecated_finders.
Use #to_a instead.
Diffstat (limited to 'activerecord/lib/active_record/relation/batches.rb')
-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 5b78b246ab..fddfb5c11e 100644 --- a/activerecord/lib/active_record/relation/batches.rb +++ b/activerecord/lib/active_record/relation/batches.rb @@ -67,7 +67,7 @@ module ActiveRecord batch_size = options.delete(:batch_size) || 1000 relation = relation.reorder(batch_order).limit(batch_size) - records = relation.where(table[primary_key].gteq(start)).all + records = relation.where(table[primary_key].gteq(start)).to_a while records.any? records_size = records.size |