Skip to content
This repository

Order #27

Open
dxg opened this Issue · 1 comment

2 participants

Arek W Filipe Goncalves
Arek W
dxg commented

Query order overrides default order set in models.
lib/dm-pager/pagination.rb:
line 43: :order => [:id.desc]

This overrides default ordering set in models, eg:
(inside model class):
default_scope(:default).update(:order => [:created_at.desc])

Filipe Goncalves

If you set the order inside the page method like Item.page(1,:per_page => 10,:order => [:created_at.desc]) you can overcome this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.