-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
Consider the following:
field :roles, :type => Array scope :admins, any_in('roles' => ['admin'])
it works as expected and produces the following criteria:
<pre>
<Mongoid::Criteria
selector: {"roles"=>{"$in"=>["admin"]}},
options: {},
class: User,
embedded: false>
</pre>
now, if I change the Array to Set, e.g. field :roles, :type => Set , then the produced criteria is wrong:
<pre>
<Mongoid::Criteria
selector: {"roles"=>{"$in"=>[[["admin"]]]}},
options: {},
class: User,
embedded: false>
</pre>