Using Mongoid, how can I check if given the limit/results_per_page
options there is a next page ?
Suppose my scope is
MyCollection.page(@page).per(@per)
Calling .count
will compute the total number of results across all pages. But how do I detect if the current page is full/empty ? Or better if the next page is empty ? Do I have to resolve the scope by calling something like to_a
?