search for: games_victor

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

Did you mean: games_victors
2006 Feb 19
4
Multiple HABTM to one table
...bles. class Game < ActiveRecord::Base has_and_belongs_to_many :players, :uniq => true has_and_belongs_to_many :victors, :class_name => ''Player'', :uniq => true end When I add Player A to players, and Player B to victors, and save the game, there is no INSERT for games_victors, but there is for games_players. I cannot figure out why this is so. Furthermore, when I load the game, there are two SELECTs with JOINS to GAMES_PLAYERS, instead of one for GAMES_PLAYERS and one for GAMES_VICTORS. What have I done wrong? David