Joaquin Rivera padron wrote: > hi there, > lets say you have: A that belongs_to :b, and B belongs_to :c > > how do you normally go about saying A belongs_to :c, :through => :b ??
If A belongs_to :b, that means that Rails expects a b_id field in A's table. In your case, that doesn't exist, so what you want is A has_one :c, :through => :b 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.

