MongoMapper OR clause on 2 columns - Rails 3.1.rc4
How to perform something like this:
User.where("private = 1 开发者_开发知识库OR beta = 0")
See: http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24or
That translates to:
User.where(:$or => [{:private => 1}, {:beta => 0}])
精彩评论