I have a set of objects that I would like to paginate in a bit of a unconventional way. Some objects have a file attached and some don't. The behavior I would like is for the first set of objects without a file attached to be shown on the first set of pages and then for the objects with a file attached to be displayed on the following pages.
So if objects 1-10 have no attachments, and there are 8 objects viewed per page. I would like page one to have 8, and then page 2 to have only 2 objects, and the arrow to proceed to the next page. The remainder of the pages should paginate normally with the remaining objects with files attached, each with 8 per page.
I've looked at some code here: How to set different page size for the first page in Kaminari? This allows custom counts on the first page using padding, but haven't got it working correctly and wondering if there is a better solution.