问题
How to perform something like this:
User.where("private = 1 OR beta = 0")
回答1:
See: http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24or
That translates to:
User.where(:$or => [{:private => 1}, {:beta => 0}])
来源:https://stackoverflow.com/questions/7175328/mongomapper-or-clause-on-2-columns-rails-3-1-rc4