Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Missing Chapter: Order

PikachuEXE edited this page Nov 16, 2012 · 2 revisions

The readme does not mention how to use order method
So let's write it ourselves!

Basic

Just like where{column}, we write order{column}, done XD

Direction

Actually you can find more in these files:

Most useful methods: asc, desc So just write them like order{column.asc} and order{column.desc}, done!

Multiple Columns

  1. Pass in array:
    order{[first_name.asc, last_name.desc]}
  2. Method chain:
    .order{[username.asc, id.desc]}.order{[first_name.desc, last_name.asc]}
Clone this wiki locally