On 12 August 2011 20:16, Vanildo Prates
<vprates-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have a question about query on Rails.
> I have my models defined as shown below:
> - Person
> has_many :autors, :dependent => :destroy
> has_many :accused, :dependent => :destroy
> - Reus
> belongs_to :person
> belongs_to :proceeding
> - Autores
> belongs_to :person
> belongs_to :proceeding
> - Proceeding
> has_many :accused, :dependent => :destroy
> has_many :autors, :dependent => :destroy
> has_many :persons, :through => :autors, :as => :person_autor
> has_many :persons, :through => :accused, :as => :person_accused
>
> The question is: How do i filter out the name of accused and the autor in
> the same query.
Sorry, I do not understand what you want to do. Perhaps you could
explain in a bit more detail.
Colin
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.