I am building a rails3 web app. Is there a query like this in mongoid
db.collection.where((:status => "abc" OR :status2=>"abc") , :license=>"Active")
I don’t know what fields are present in my collection, one between status and status2 field could exists in my collection or both may exists.
Update
I found that I could use any_of for OR but it is not working. The query is runny find but there is no result.
db.collection.any_of(:status=>"abc",:status2=>"abc").where(:license=>"Active")
Posted this question without enough search. The answer is