I have a class Player, and a class Game.
Game has two HABTM relationships to the Player table through seperate
class Game < ActiveRecord::Base
has_and_belongs_to_many :players, :uniq => true
has_and_belongs_to_many :victors, :class_name => ‘Player’, :uniq =>
When I add Player A to players, and Player B to victors, and save the
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
What have I done wrong?