Hi, i'm trying to figure out how to do a query with an ambiguous
condition
Lets say Comment belongs_to :article and :user,
and Article :belongs_to :user
How can I find the comments by one user on articles by another user
in one query?
This doesnt work, but is kind of the idea:
Comment.find :all, :conditions => {'users.name' =>
'Cccc', :article => { 'users.name' => 'Aaaa' } }, :include => [:user,
{ :article => :user } ]
linoj
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---