I'm a beginner when it comes to ruby on rails. In my project I'm using 'kaminari' gem to paginate collection of images. I would like to reverse the original pagination so instead of:
< , 1, 2, 3, 4 ... 10, >
*where numbers are page numbers and arrows show prev and next for the pagination view
I want to get:
<, 10, 9, 8, 7 ... 1, >
My problem is that I can't find any working solution and therefore I'm asking you guys for help. I would like to avoid using paginate_array due to optimization reason. Is there a way to simply flip the pagination from right to left? Is something like this even possible with kaminari or should I switch to something else for pagination?
order
,limit
,offset
and rubyreverse
in end. – Зелёный