On Fri, Oct 22, 2010 at 9:10 AM, Anthony Crumley
<[email protected]>wrote:

> 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.
>

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

<div class="pagination">
<span class="disabled prev_page">previous</span>
 <span class="current">1</span>
 <a href="/articles?page=2" rel="next">2</a>
 <a href="/articles?page=3">3</a>
 <a href="/articles?page=4">4</a>
 <a href="/articles?page=2" class="next_page" rel="next">Siguiente</a>
</div>


you have to use js to unobtrusively create the proper    <a
href="/articles?page_articles=2" rel="next"> and  <a
href="/news?page_news=5" rel="next">, 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?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: 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/rubyonrails-talk?hl=en.

Reply via email to