diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-09-21 19:42:14 -0300 |
---|---|---|
committer | Alexis Bernard <alexis@obloh.com> | 2012-11-08 17:26:47 +0100 |
commit | 9673735074626a8e3920cc90c0d1c2f18bfffc8e (patch) | |
tree | c93b018a8d0ff47cf3a0d791f9514510c19d31e0 /activerecord/lib | |
parent | e41d78ce221b2ca84cc260e20f3813eaace586b3 (diff) | |
download | rails-9673735074626a8e3920cc90c0d1c2f18bfffc8e.tar.gz rails-9673735074626a8e3920cc90c0d1c2f18bfffc8e.tar.bz2 rails-9673735074626a8e3920cc90c0d1c2f18bfffc8e.zip |
start could be a string
Related to 761bc751d31c22e2c2fdae2b4cdd435b68b6d783 and
eb876c4d07130f15be2cac7be968cc393f959c62
Conflicts:
activerecord/lib/active_record/relation/batches.rb
activerecord/test/cases/batches_test.rb
Diffstat (limited to 'activerecord/lib')
-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 2fd89882ff..e7d916f2da 100644 --- a/activerecord/lib/active_record/relation/batches.rb +++ b/activerecord/lib/active_record/relation/batches.rb @@ -59,7 +59,7 @@ module ActiveRecord relation = apply_finder_options(finder_options) 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) |