I'm wondering if there is a way to take an array of ActiveRecord results (or any array, for that matter) and process it in groups of 25 or so. Something like this:
User.all.each(25) do |group|
# Some code that works with this group of 25
end
I'm just looking to avoid doing multiple successive database queries. Thanks!