I use will_paginate for the nested notes in the contact show view. The contacts controller looks like this:
@contact = Contact.find(params[:id], :include => :notes)
@notes = @contact.notes.paginate(:page => params[:page], :per_page => 5, :order => "created_at ASC")
The contacts show view has the <%= will_paginate @notes %> tag. This works, but the sort order is not correct, it shows all 6 notes instead of 5 and the pagination at the top is reversed, it is “next,2,1,previous” instead of “previous,1,2,next”???
How stupid!! Finally found the problem, the elements had a “float: right” so that caused the reverse order….