Also having difficulty getting the has_many to work with this. I thought about a separate join table for it,and even got it working with has_and_belongs_to_many :beat , :class_name => 'Player' , :foreign_key => 'winner_id' , :association_foreign_key => 'loser_id' , :join_table => 'games' , :conditions => { :active => true }
has_and_belongs_to_many :lost_to , :class_name => 'Player' , :foreign_key => 'loser_id' , :association_foreign_key => 'winner_id' , :join_table => 'games' , :conditions => { :active => true } But then I still had the same problem of selecting everyone played and wasn't sure how to deal with draws, and the game doesn't know who is player1 and who is player2, so I moved them into the game table. :/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.