I am attempting to model a table tennis match in rails. Here is what I have:
Game Model:
team_1_score
team_2_score
team_1_id
team_2_id
Team Model:
game_id
player_id
Player Model:
Name
So each game will consist of 2 teams (of either 1 or 2 players each).
Then I was planning on linking game to player with has_many, :through. I don't think this will work because of the 2 instances of team in each game. But I really don't know where I should go from here. Any help would be greatly appreciated.