How can I write the code below so that it passes the user.id. Given what I have, it throws Class id not found error. (User has many fights. And Fight belongs to user. User can either be a challenger in the fight, or a challengee in the other.)
has_many :fight_wins, :class_name => 'Fight', :foreign_key => 'challenger_id or challengee_id',
:conditions => ["(challenger_id = ? and challenger_won = ?) or (challengee_id = ? and challenger_won = ?)", self.id, true, self.id, false]