I’m trying to setup some mildly complex associations for a project we’re
working on and can’t seem to find much documentation on n-way has_many
I have the following models: Person, PhysicalAddress, EmailAddress,
Each person can have multiple PhysicalAddresses, EmailAddresses, and
PhoneNumbers, and multiple people can share the same PhysicalAddress,
EmailAddress, or PhoneNumber.
I need to track the types of associations (i.e. home, work, cell, etc)
for each, so habtm definitely won’t cut it.
Do I need to setup separate join tables for each association
(people_physical_addresses, people_phone_numbers, etc), or should I
have a ‘contacts’ (for lack of a better name at the moment) table with
several columns for person_id, physical_address_id, phone_number_id,
email_address_id, & contact_type. Or should I do something else