search for: football_gam

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

Did you mean: football_games
2007 Oct 15
2
Association Help , 2 Teams playing a FootballGame
...e to do something like this @t1 = Team.create(:name=>"Michigan Wolverines football") @t1.save @t2 = Team.create(:name=>"Penn State Nittany Lions football") @t2.save @g = FootballGame.create(:hometeam => @t1, :awayteam => @t2) @g.save my migrations: create_table :football_games do |t| t.column :hometeam, :integer t.column :awayteam, :integer end create_table :teamsdo |t| t.column :name, :integer end I''ve tried various has_one declarations but I keep ending up with NULL s for hometeam and awayteam... Anyone help me ??? Thanks --~--~----...