In your implementation, params[:page]
applies for both paginations.
You must provide a custom pagination parameter for either list, so each will have its own parameter.
So, for example:
In your view, you will have two paginations:
= will_paginate @comments
and
= will_paginate @projects, :param_name => "pr_page"
So, in your controller:
def index
@projects = Project.paginate(page: params[:pr_page], per_page: 10)
@comments = Comment.paginate(page: params[:page], per_page: 10)
end