will_paginate -> How to change the default url?

Tiago picture Tiago · Mar 3, 2010 · Viewed 8.8k times · Source

will_paginate plugin aways generates the pagination to the current url appending the page parameter.

Is there a way to change this? I need it to paginate to another controller/action plus some arguments.

Answer

Simone Carletti picture Simone Carletti · Mar 3, 2010
will_paginate(@collection, :params => { :controller => "articles", :action => "paginate" })