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
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
Wow, that was stupid of me. I must not have been awake when I wrote
that. has_one :through will probably work, but my explanation is
totally inaccurate. Sorry.