I am using Mongoid. I have a document that looks like the following:
Pet:
foo: {bar: 1, foobar: 2}
another_attr: 1
In this case, preferably using Mongoid, how would I query for all pets that have a bar value greater than 0 where another_attr is equal to 1?