Рейлс заказ
User.order(email: :desc)
Lioruby
User.order(email: :desc)
Page.order("category_id ASC")
# SELECT "pages".* FROM "pages" ORDER BY category_id ASC
User.order(:name, email: :desc)
# SELECT "users".* FROM "users" ORDER BY "users"."name" ASC, "users"."email" DESC