No pagination links are appearing
Author: skillmatic-coCreated Aug 16, 2024Updated Dec 22, 2025
Hello,
Trying to search docs and/or past issues, but when you are using .includes, do you have to do anything special?
I have a query like:
@registries_with_requested_transfers = Registry.includes(:transfers, :orders).where(:transfers => {requested: true, issued: false}).order('transfers.requested_at DESC').page(params[:page]).per(5)But in my view when I put <%= paginate @registries_with_requested_transfers %> nothing is appearing. However if I manually go to page 2 by putting ?page=2 in the URL, it's successfully giving me page 2 results.
@registries_with_requested_transfers.count returns 30, so I definitely have enough results to page through.
Any idea what's happening here?
Source: kaminari/kaminari