Skip to content

Instantly share code, notes, and snippets.

@suryagaddipati
Created August 30, 2011 01:06
Show Gist options
  • Save suryagaddipati/1179858 to your computer and use it in GitHub Desktop.
Save suryagaddipati/1179858 to your computer and use it in GitHub Desktop.
grouped_by_name = _{
from o
in_ Order
where ["second", "first"].member?(o.name)
order_by o.name
group_by o.name => :g
select :name => g.key , :orders => g.values
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment