I have two partial. The first have a common will_paginate but in the second will_paginate I need to change the links (default url) generated by will_paginate.
Please I need their answer.
Thanks
You can use :param_name to change the query-string parameter:
<%= will_paginate @posts, :param_name => :posts_page %>
<%= will_paginate @comments, :param_name => :comments_page %>
Note that in your controller you must also change this:
@posts = Post.paginate :page => params[:posts_page]
@comments = Comment.paginate :page => params[:comments_page]
Try this
will_paginate(@some_collection, :params => { :controller => "foo", :action => "bar" })
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With