HABTM relationship with two join tables

Ok, I have a People table, a Shows table, a Techs table, and a
Castmembers table. The people table has contact info about each person,
the techs and castmembers tables have information about the persons
specific role in that sshow. i want to call @show.techs (or somethign
equivelent, I don’t want to start that code yet) and get all the techs
associated with the show, and the information stored in the people
table, and the role info in the techs table. also, a person can be a
tech or castmember for more than one show, with different role
information for each show, any idea how to do this? Should it be a
HABTM, or a has_many :through? Code examples very welcome

Chris C. wrote:

Ok, I have a People table, a Shows table, a Techs table, and a
Castmembers table. The people table has contact info about each person,
the techs and castmembers tables have information about the persons
specific role in that sshow. i want to call @show.techs (or somethign
equivelent, I don’t want to start that code yet) and get all the techs
associated with the show, and the information stored in the people
table, and the role info in the techs table. also, a person can be a
tech or castmember for more than one show, with different role
information for each show, any idea how to do this? Should it be a
HABTM, or a has_many :through? Code examples very welcome

For all who are interested we have a chat on IRC and came up with this:
http://rafb.net/paste/results/mfYceo71.html

Always welcome for people to make corrections / improvments :slight_smile:

Cheers,
Mark