njmacinnes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Apr-12 14:48 UTC
double has_many :through
Is it possible to have a has_many :through on top of another has_many :through? So, A has_many B through => C. Can I then use that has_many relationship to create another has_many :through? A has_many D through => B? (assuming D has_many B, of course) -Nathan --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 4/13/07, njmacinnes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <njmacinnes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Is it possible to have a has_many :through on top of another has_many > :through? > > So, A has_many B through => C. Can I then use that has_many relationship > to create another has_many :through? A has_many D through => B? (assuming D > has_many B, of course) > > -NathanI actually tried this last night, but I could not get it to work like this. Instead I ended up using has_many with :finder_sql but this is less than ideal aswell since you loose a log of methods on it. If you come up with anything I would also like to know Cheers --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---