Skip to content

Instantly share code, notes, and snippets.

@matsimitsu
Created December 18, 2009 21:24
Show Gist options
  • Save matsimitsu/259770 to your computer and use it in GitHub Desktop.
Save matsimitsu/259770 to your computer and use it in GitHub Desktop.
something like this? (from mongo activerecord docs)
# multiple options; works fine
User.all(:age => [1,2,3])
# >> [#<User age: 3>]
# using the $lt operator; works fine
User.all(:age => {'$lt' => 10})
# >> [#<User age: 3>]
# combining multiple options with the $lt operator; fails.
User.all(:age => {'$lt' => 10, '$in' => [50])
# >> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment