I have a little web app where we need to paginate collections of
items. I’m trying to sort the collection and then pass it, sorted, to
a Paginator, and still be able to paginate through the collection,
across several pages, with the new sort order. The only thing I’m
doing differently from the regular scaffolding approach is this:
@order_pages = Paginator.new(self, @orders.length, 10, (params[:page]
It doesn’t work.
@orders is sorted when I hand it to Paginator. Am I skipping a step?
Does Paginator only work on run-of-the-mill SQL calls? I can’t seem to
figure this out.