search for: teamsseason

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

Did you mean: teams_seasons
2006 Jan 09
3
Include with two references of one model of the same table
...e SQL spit out showed only one select on "matches" where I think should be two selects on two aliases of "matches". Heres some code below to better understand what I''m talking about. class Match < ActiveRecord::Base belongs_to :hometeam, :class_name => "TeamsSeason", :foreign_key => "hometeam_id" belongs_to :awayteam, :class_name => "TeamsSeason", :foreign_key => "awayteam_id" end class TeamsSeason < ActiveRecord::Base has_many :hometeam, :class_name => "Match", :foreign_key => "homet...