[PATCH] Allow find_in_batches to use :order, :limit, and :offset

22 views
Skip to first unread message

Brian Durand

unread,
Mar 5, 2009, 12:57:58 PM3/5/09
to Ruby on Rails: Core
Created patch which allows find_batches to use :order, :limit,
and :offset for better control over batch processing. Also supports
models which don't use integer primary keys.

http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2137-allow-find_batches-to-use-order-limit-and-offset#ticket-2137-2

Mislav Marohnić

unread,
Mar 5, 2009, 8:24:06 PM3/5/09
to rubyonra...@googlegroups.com
On Thu, Mar 5, 2009 at 18:57, Brian Durand <br...@embellishedvisions.com> wrote:

Created patch which allows find_batches to use :order, :limit,
and :offset for better control over batch processing.

See my reply on the main thread about why giving such options might not be a good idea.

Anyway, the will_paginate plugin provides the `paginated_each` class method on models which lets you iterate with :order and :per_page parameters.
Reply all
Reply to author
Forward
0 new messages