aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/batches.rb
diff options
context:
space:
mode:
authorNat Welch <nat@natwelch.com>2011-09-21 23:53:18 -0700
committerNat Welch <nat@natwelch.com>2011-09-21 23:53:18 -0700
commit667d21814b67c615d3317488d0678cb992d3bdb1 (patch)
treed10e68a7d904641f88e6e835074273ab0bcafbc4 /activerecord/lib/active_record/relation/batches.rb
parentf69036781c0ee7a22a456fe3a6689277d44ed9a6 (diff)
parent2bf33bd4bcd488a35e641b32dd667f3092ea9197 (diff)
downloadrails-667d21814b67c615d3317488d0678cb992d3bdb1.tar.gz
rails-667d21814b67c615d3317488d0678cb992d3bdb1.tar.bz2
rails-667d21814b67c615d3317488d0678cb992d3bdb1.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activerecord/lib/active_record/relation/batches.rb')
-rw-r--r--activerecord/lib/active_record/relation/batches.rb2
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 ec1176e3dd..2fd89882ff 100644
--- a/activerecord/lib/active_record/relation/batches.rb
+++ b/activerecord/lib/active_record/relation/batches.rb
@@ -62,7 +62,7 @@ module ActiveRecord
start = options.delete(:start).to_i
batch_size = options.delete(:batch_size) || 1000
- relation = relation.except(:order).order(batch_order).limit(batch_size)
+ relation = relation.reorder(batch_order).limit(batch_size)
records = relation.where(table[primary_key].gteq(start)).all
while records.any?