Once again, as always, thanks to the both of you.

Scott

On Tue, Jul 14, 2009 at 6:15 AM, Michael Fellinger <[email protected]>wrote:

>
> On Tue, Jul 14, 2009 at 8:14 AM, Jeremy Evans<[email protected]>
> wrote:
> >
> > On Jul 13, 3:00 pm, Scott LaBounty <[email protected]> wrote:
> >> Jeremy,
> >>
> >> Thanks, that did it.
> >>
> >> OK, if I haven't tried your patience too much yet ... While I was trying
> to
> >> get this working, I realized that Ramaze itself has a paginate type
> function
> >> (looks like it may have been modeled on Sequel). Is there a reason to
> use
> >> one over the other? The Ramaze one works on arrays, so I'm doing
> something
> >> like @books = paginate(Book.select.order(:title).all). This seems to
> work
> >> fine for what I'm doing, but I don't always know all the facts.
> >
> > The Ramaze pagination feature is generic, and probably should not be
> > used in production environments with large datasets.  Because it
> > requires an array, you would need to select all records from the
> > dataset instead of only the records you need to display that page.
>
> The Ramaze paginate does actually use the sequel paginate method if
> possible, but can also handle arrays.
> Github is down right now, so I can't point to the exact location, but
> if you do something like:
>
> @books = paginate(Book.select.order(:title)), it will call
> Book.select.order(:title).paginate and work with that.
> The Array handling was added after this functionality to provide a
> common interface to data that is in memory already.
> Seems like I have to update the documentation to make this clear.
>
> --
> ^ manveru
>
> >
>


-- 
Scott
http://steamcode.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" 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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to