Greg Willits wrote in post #955551: > Aaa has_many Bbb and Bbb has_many Ccc. There is no :through involved. > Ccc table does not have a FK back to Aaa. (Legacy schema.) > > An instance of aaa can easily query with aaa.bbb.find (or .paginate), > but aaa.bbb.ccc.paginate() doesn't work because Aaa has no knowledge of > Ccc.
No, that's not why it doesn't work. It doesn't work because aaa.bbb is an Array (or actually an AssociationProxy, but don't worry about that), not a Bbb object. Therefore it has no ccc method the way a Bbb object would. What you need is Aaa has_many :cccs, :through => :bbbs. No DB changes will be involved. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- 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.

