Im wondering how I can define the following table structure from a
legacy DB in Rails.
If I have three tables, tables A, B and C. And in table A, I have an
integer field, call it ‘B_or_C_id’ and also an integer field in table A
called ‘you_must_use_C’ which, if -1 means
A.B_or_C_id = C.id
and if 0 means
A.B_or_C_id = B.id
How in the world do you define this in ActiveRecord in terms of
‘belongs_to,’ and ‘has_many’
Thanks, Ralph V.