Skip to content

Instantly share code, notes, and snippets.

@heynemann
Created May 15, 2009 03:20
Show Gist options
  • Save heynemann/112043 to your computer and use it in GitHub Desktop.
Save heynemann/112043 to your computer and use it in GitHub Desktop.
From(collection)
.order_by("-(salary + bonus)")
.select("name","age","sex","salary","salary + bonus")
# This query returns the evaluated return of salary + bonus
# as dynamic_4 and sorts through this expression in desc order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment