I''ve been looking over the Paginator class stuff, and it seems as though any example I can find assumes that the objects are being pulled from the database. Is there any way to iterate over a set of objects that have been put together using some custom filtering/ sorting/etc? I thought the objects could be stored in the session as a means of getting them from page to page, and could be cleaned out at an appropriate time in the program flow when they weren''t needed. However, I don''t know if there is a way to use the Paginator class to deal with this or not. Thanks!
Joshua Sierles
2005-Jul-14 08:29 UTC
Re: Pagination over a custom-generated array of objects?
Perhaps you''d find this useful, deep from the canadian trenches: http://www.bigbold.com/snippets/posts/show/389 On 7/14/05, Steven Palm <n9yty-OmfSJW1at7AAvxtiuMwx3w@public.gmane.org> wrote:> I''ve been looking over the Paginator class stuff, and it seems as > though any example I can find assumes that the objects are being > pulled from the database. Is there any way to iterate over a set of > objects that have been put together using some custom filtering/ > sorting/etc? > > I thought the objects could be stored in the session as a means of > getting them from page to page, and could be cleaned out at an > appropriate time in the program flow when they weren''t needed. > However, I don''t know if there is a way to use the Paginator class to > deal with this or not. > > Thanks! > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Steven Palm
2005-Jul-14 16:24 UTC
Re: Pagination over a custom-generated array of objects?
On Jul 14, 2005, at 3:29 AM, Joshua Sierles wrote:> Perhaps you''d find this useful, deep from the canadian trenches: > > http://www.bigbold.com/snippets/posts/show/389Immense thanks! That is exactly what I needed!! Steve