diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-09-21 19:42:14 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-09-21 19:42:16 -0300 |
commit | 5b99cf088c89eba655adc588af40b1970fdd76a9 (patch) | |
tree | 9599b79fd919ff1a9368c3d4cf27650c993ef3cc /activerecord/lib/active_record | |
parent | eb876c4d07130f15be2cac7be968cc393f959c62 (diff) | |
download | rails-5b99cf088c89eba655adc588af40b1970fdd76a9.tar.gz rails-5b99cf088c89eba655adc588af40b1970fdd76a9.tar.bz2 rails-5b99cf088c89eba655adc588af40b1970fdd76a9.zip |
start could be a string
Related to 761bc751d31c22e2c2fdae2b4cdd435b68b6d783 and
eb876c4d07130f15be2cac7be968cc393f959c62
Diffstat (limited to 'activerecord/lib/active_record')
-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 4d14506965..28aab6d92b 100644 --- a/activerecord/lib/active_record/relation/batches.rb +++ b/activerecord/lib/active_record/relation/batches.rb @@ -62,7 +62,7 @@ module ActiveRecord ActiveRecord::Base.logger.warn("Scoped order and limit are ignored, it's forced to be batch order and batch size") end - start = options.delete(:start).to_i + start = options.delete(:start) || 0 batch_size = options.delete(:batch_size) || 1000 relation = relation.reorder(batch_order).limit(batch_size) |