Hello,I want to ask if i can use will_paginate plugin two times on one page? For example i have table with male users and table with female users on one page or in one view and I need paginate both tables. My question is what is the usual solution of this problem?
+2
A:
You can specify a :param_name
option to tell will_paginate the name of the parameter to use for the page number within URLs (the default is :page
). So you could do:
<%= will_paginate @males, :param_name => 'males_page' %>
<%= will_paginate @females, :param_name => 'females_page' %>
John Topley
2010-07-29 10:22:58
Thank you John.
Suborx
2010-07-29 11:55:43