rails/rails — pull request #14465 by bogdan (2014-03-24 08:56:04+00:00)
Title: Pass AR::Relation instead of Array to find_in_batches block

This patch allows to operate a relation inside of `find_in_batches` that allows to have some additional flexibility.

Example:

`User.where(condition).update_all` will lock table for writing in MySQL if there are too many records (> 100k). But the following will be possible after this patch:

``` ruby
User.where(condition).find_in_batches do |relation|
relation.update_all("disabled = true")
end
```