How to paginate in the same view?

Hello everybody,

I'm working with will_paginate and i want to know how to paginate two
portlet in the same view. Because the work just like this: When i
click in the next page in one portlet, it goes to the next page but in
the other portlet it also goes to the next changes.

Can anyone help me?

Thanks.

If you provide the :param_name option to the will_paginate helper method then you can page the two separately by providing separate page params. If you do this, you will need to maintain the previous page number in a session variable or cookie so you don’t loose the page on the other list.

You may also want to consider using ajax to page them individually without refreshing the whole page.

http://github.com/mislav/will_paginate/wiki/ajax-pagination

i dont think this is enough since the will_paginate helper will generate links like this

previous

1
2
3
4

Siguiente

you have to use js to unobtrusively create the proper and , otherwise

the links will always pass the same param: page for any collection, and if that happens how will you figure out what page is changing?