Kaminari, if the next page exists?
What's the method in kaminari
to find out if the next page exists? With will_paginate
its simple, you just call next_page?
on the model. I wonder if there is anything inkaminari
+3
Bhushan lodha
source
to share
1 answer
To check if the next page is in kaminari views use current_page.next?
.
To query @posts, you can use @posts.next_page
which will return nil if there is no next page on the next page, or @posts.last_page?
which will be false if there is no next page.
+7
infused
source
to share