Ruby - $or is not working in mongo local server, but working in online server
DdFbcrawlLinks.where(:$or => [{:feedtype => "news"},{:feedtype开发者_开发技巧 => "wall"}]).all
DdFbcrawlLinks is my model and it has the values. But unfortunately the abouve line is returning empty array
But the same code is working fine in online server
Please help
In your specific query, using $in would be better
DdFbcrawlLinks.where(:feedtype.in=>["news","wall"]).all
More: http://mongoid.org/docs/querying/criteria.html
精彩评论