I assume that your gem sets the default scope for the audit model, which orders by version, so at the moment it orders in ascending order by the version column and, only if the two records are the same, it orders by id in descending order.
To fix this, you can add unscoped to your chain:
Audit.unscoped.order("id DESC").page(page).per(50)
Nick colgan
source share