I set up a website that uses AJAX-pagination powered by Kaminari. I also have set up simple filtering and searching, so you can browse my list on http://example.com/products/filter?query=blah.
I'm using Kaminari's built-in link_to_next_page
helper to generate my next-page link. The problem comes about because this generated link ignores my queries/filters, sending anyone on http://example.com/products/filter?query=blah to http://example.com/products?page=2
One solution I've toyed with is to rewrite the link_to_next_page helper to include my filters and search-terms, but this is (as with all things) more work than expected. Is there a better way?