Hi,

I wonder how I can insert "OR" in has_and_belongs_to_many conditions?

Code:
has_and_belongs_to_many :projects, :conditions =>
["projects_users.user_id = 0"]

Console:
user.projects

SQL:
 Project Load (0.3ms)   .... WHERE ("projects_users".user_id = 1 AND
(projects_users.user_id = 0))

I wonder if I can change AND to OR

Thanks for help :D
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to