Skip to content

Instantly share code, notes, and snippets.

@ffloyd
Created July 11, 2013 18:46
Show Gist options
  • Save ffloyd/5978074 to your computer and use it in GitHub Desktop.
Save ffloyd/5978074 to your computer and use it in GitHub Desktop.
Interesting mongoind "direct upsert"
MongoidClass.collection.find(param1: 'blablab', param2: 'blablabla').upsert("$set" => hash_with_additional_opts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment