Skip to content

Instantly share code, notes, and snippets.

@brapse
Created September 18, 2009 20:53
Show Gist options
  • Save brapse/189284 to your computer and use it in GitHub Desktop.
Save brapse/189284 to your computer and use it in GitHub Desktop.
uniques, duplicates = results.inject([[],[]]) do |buckets, res|
buckets[res['occurrences'] == '1' ? 0 : 1].push(res['id'])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment