I have a Rails app with Users, and each user HABTM Roles.
I want to select Users without a specific role. I have searchlogic at my disposal, and I'm lost. I've tried using a combination of conditions and joins and includes and what not, but I can't seem to nail it. This works:
User.find(:all, :conditions => ['role_id != ?', Role[:admin].id], :joins => :roles)
To find users that are not admins, but doesn't not find users with no roles (which I want to find as well).
What simple thing am I missing in my tired state?