adam witt wrote in post #1048895: > Class Pair > belongs_to :individuals, :foreign_key => "individual_a" > belongs_to :individuals, :foreign_key => "individual_b" > end > > Class Individual > has_many :pairs > end
This is a classic "repeating groups" database design problem. I don't really feel like expending brain cells to explain it. However, as a hint look up "database normalization" paying close attention to the "First Normal Form (1NF)". -- 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.

