order(*args)
Instance Public methods
Allows to specify an order attribute:
User.order('name') => SELECT "users".* FROM "users" ORDER BY name User.order('name DESC') => SELECT "users".* FROM "users" ORDER BY name DESC User.order('name DESC, email') => SELECT "users".* FROM "users" ORDER BY name DESC, email User.order(:name) => SELECT "users".* FROM "users" ORDER BY "users"."name" ASC User.order(email: :desc) => SELECT "users".* FROM "users" ORDER BY "users"."email" DESC User.order(:name, email: :desc) => SELECT "users".* FROM "users" ORDER BY "users"."name" ASC, "users"."email" DESC
Please login to continue.