On 21.9.2005, at 21.37, Ezra Zygmuntowicz wrote:
> Hey list-
> I have an intranet site for customer survey data. The list view
> is basically lists of the survey records with a check mark for
> marking them read or not. So when you check the checkbox it onclick
> submits and reloads the page placing the read items in list on the
> bottom of the page. I guess its real similar to the first todo list
> tutorial on rubyonrails.com from last year. So checking or
> unchecking the check box moves a record to the unread list or to
> the read list. Works great, but I want to paginate both of them
> separately. So If my list action is like this:
>
> def list
> @survey_pages, @surveys = paginate :survey, :per_page => 4
> @survey_pages_done, @surveys_done = paginate :survey, :per_page
> => 4
> end
>
> How would I go about having two separate collections both paginate
> independently of each other?
The Paginator class has a :parameter option which defaults to
''page''.
I think if you rename it according to your needs (say, ''page''
and
''done_page''), you can use two separate paginations on a single
page.
See http://rails.rubyonrails.com/classes/ActionController/
Pagination.html#M000076 for more info.
//jarkko
>
> Thanks for any help-
> -Ezra Zygmuntowicz
> Yakima Herald-Republic
> WebMaster
> http://yakimaherald.com
> 509-577-7732
> ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails