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

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -