Both privacy and users are arrays. I've taken out some logic to show the important stuff.
named_scope :non_employees_and_beloning_to_users, lambda { |args|
privacy = args[0]
users = args[1]
{ :conditions => ["(visibility = ? && user_id = ?)", privacy, users] }
}
but basically, the above generates the below, and when typed into a MySQL editor thing, no results show up. so, I came to believe this isn't the correct method for searching for stuff in mySOL with an array?
SELECT *
FROM `proposals`
WHERE visibility = '1,0' && user_id = '-1,8,9,11';
I want it to have the effect of
visibility = (1 or 0 ) AND user_id = (-1 or 8 or 9 or 11)