List Info

Thread: Pagination - why is it this hard?




Pagination - why is it this hard?
user name
2006-01-31 19:30:12
You might also want to look at paginating prefetched
collections:

http://rails.techno-w
eenie.net/question/2006/1/10/passing_specific_records_to_the
_paginator

Check out solution number two.


On 1/31/06, Kevin Skoglund <kevinpixelandpress.com>
wrote:
> If paginate won't work for your custom find try
creating your own
> Paginator instead.  It's a few more steps but it's
flexible and
> nothing to be afraid of.
>
> Use the techniques on this page under Custom
Pagination:
>         http://wiki.rubyonrails.com/rails/pages/HowtoPagination
>
> Focus on getting the elements of the Paginator object
together:
>         1. count of ALL items in the found set
>         2. number of items per page
>         3. current page
>
> Then execute the custom find you want.  If it's a small
data set you
> can find the full set, count it and then use it on the
page.  If it's
> a large data set you should perform a count of all the
items then do
> a find for only the current range (using the offset).
>
> Email me directly if you still have problems and I'll
try to help more.
>
> Kevin Skoglund
>
>
> _______________________________________________
> Rails mailing list
> Railslists.rubyonrails.org
> h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
>


--
------------------------------------------------------------
--------
I am Mark Daggett and I approve this message.
_______________________________________________
Rails mailing list
Railslists.rubyonrails.org
h
ttp://lists.rubyonrails.org/mailman/listinfo/rails
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )