search for: inverserelnshiptype

Displaying 1 result from an estimated 1 matches for "inverserelnshiptype".

2006 Mar 13
2
HowToHandleMultipleRelationshipsBetweenTables?
...her. This problem is partially described in the "HowTo..." with the topic title above. My model looks like this: class Relationship < ActiveRecord::Base belongs_to :relationshiptype, :foreign_key => "relnshiptype" belongs_to :relationshiptype, :foreign_key => "inverserelnshiptype" end It doesn''t work because I think you can''t specify the same model valiable? "relationshiptype" more than once. The table is "relationshiptype" and the Class is therefore "Relationshiptype". How can the "belongs_to" argument be...