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