0
谁知道是什么where(:genres.in => [ "rock" ]
意味着mongoid
我看到文件这些代码:??什么地方(:genres.in => [“石头”]意味着Mongoid,我怎么能找到参考
class Band
include Mongoid::Document
field :country, type: String
field :genres, type: Array
scope :english, ->{ where(country: "England") }
scope :rock, ->{ where(:genres.in => [ "rock" ]) }
end
https://docs.mongodb.com/mongoid/master/tutorials/mongoid-queries/#named-scopes
似乎就意味着找到在哪里风格包含“石头”的文件,但我不知道,因为我无法找到一个参考解释in
。