rails/rails — pull request #18245 by chinshr (2014-12-29 21:07:54+00:00)
Title: Adding preorder to change order presedence

Sometimes application developers want to add a new order in front of the existing order chain in order to give precedence to new order without touching previously defined ones. Hence the name `preorder`.

Example:

User.order(:name).preorder(:id)
=> SELECT "users".* FROM "users" ORDER BY "users"."id" ASC, "users"."name" ASC