title: How would I design my model in Rails where two attributes access the same class?
body: <p>I've created a Team model that has the following attributes:</p>
  
  <pre><code>team_name
  mascot
  </code></pre>
  
  <p>I now want to create a Game model with the following attributes:</p>
  
  <pre><code>game_date
  away_team
  away_team_score
  home_team
  home_team_score
  </code></pre>
  
  <p>I want both the away_team and home_team to be foreign keys to the Team class. I'm pretty sure I can't do this using away_team:references in my generator unless there is an option to specifically select the Team class. So if I create my model with away_team and home_team set as integers, how do I setup my has_many and belongs_to associations?</p>