Will_paginate Plugin on two objects on same page Will_paginate Plugin on two objects on same page ruby-on-rails ruby-on-rails

Will_paginate Plugin on two objects on same page


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 @questions, :param_name => 'questions_page' %><%= will_paginate @answers, :param_name => 'answers_page' %>