The_Fritz
The_Fritz

Reputation: 452

Ordering with ActiveRecord, pagination with Kaminari

The following (from the index-action of my activities-controller) has no effect on the order in which the entries are displayed:

@activities = Activity.order("updated_at").page(params[:page])

The .page-part is for the Kaminari-gem that does the pagination.

What am I missing?

Upvotes: 0

Views: 540

Answers (1)

Ankun
Ankun

Reputation: 444

no, you are right. may be kaminari or somewhere else incorrect . please look over your Activity's default_scope.

Upvotes: 1

Related Questions