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.
我有一个这样的模型:
class Region field :country, type: Array end
如果我有国家名称,例如“US”,我想选择在其 :country 字段中有“US”的对象。
我能做些什么?
我想这就是你要找的
Region.any_in(:country => ['US'])