Hey Nahum! Remember running into this post a while back. Haven't used it personally, but it seems like a pretty simple cursor implementation: http://weblog.jamisbuck.org/2007/4/6/faking-cursors-in-activerecord
On Feb 3, 10:36 am, nahum <[email protected]> wrote: > I've been looking at that already, but I don't believe I can pass a > block which it runs for each page - which is what I want. I've still > gotta manually write a loop etc... which is the same as using :limit > > Nahum > > On Feb 3, 10:27 am, Jeremy Olliver <[email protected]> wrote: > > > Yeah, the will_paginate plugin is really good, extends all AR find methods > > to take :page, and :per_page options. > > > check outhttp://github.com/mislav/will_paginate/ > > > Cheers, > > Jeremy > > > 2009/2/3 nahum <[email protected]> > > > > yeah, but it'd rather not repeat myself everytime I want to do this. > > > there are plugins that extend find and do this for me, just wanting to > > > know if rails does it already. > > > > Cheers, > > > Nahum. > > > > On Feb 3, 9:35 am, Tim Haines <[email protected]> wrote: > > > > I'm pretty certain you'd know about the :limit and :offset (or whatever > > > it > > > > is) params you can pass to find - and you're looking for something that > > > > offers a more fully built package? Just checking. :-) > > > > > T. > > > > > On Tue, Feb 3, 2009 at 9:16 AM, nahum <[email protected]> wrote: > > > > > > Hi, > > > > > > so I have X million records in my books table and I want to iterate > > > > > through them all and do something (tm). obviously I don't want to > > > > > load them all at once. so before I go looking for a plugin I was > > > > > wondering if there was a native way in rails to handling this? > > > > > > It's the first thing you have to start dealing with as your site > > > > > scales after all.... :-) > > > > > > Pass .each a block to run against groups of books maybe.... > > > > > > Nahum. > > > -- > > Jeremy Olliver > > Lead Developer > > PlanHQ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "WellRailed" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/WellRailed?hl=en -~----------~----~----~----~------~----~------~--~---
