sql - Rails scope select where all values are in a list -
i've got rails scope looks this:
default_scope joins(:groups).where("groups.name in ('group1','group2')")
which filters model objects aren't in group1 or group2, need find way filter model objects don't have group1 and group2.
any suggestions? in advance.
Comments
Post a Comment