Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Mongoid 中执行以下操作:
user_infos = User.where( :"email".ne => ["",nil])
用户的电子邮件不是空白且不是零?
你可以这样做:
User.where(:email.nin => ["", nil]).to_a
尝试这个
User.where(:email.ne => "", :email.exists => true).to_a