I have seen something similar asked before, but I can not understand it, and I can not ask for help there because of low reputation to comment.
So, I am asking a new question. I am using will_paginate plug in for two objects on the same page, and they are working but both move simultaneously. For example, if I click page 2 on the first, page 2 changes even in the second pagination.
This is my code in the controller:
@tasks = @student.tasks.paginate(page: params[:page], :per_page => 2)
@plans = @student.plans.paginate(page: params[:page], :per_page => 2)
And this is my code in the view:
<%= will_paginate @tasks %>
<%= will_paginate @plans %>
How can I make this work separately?