How would I implement in Rails, a model that uses two foreign keys from the same table?

I am setting up a sports schedule database. I have a team's table that has a PK of id, and then there will be a game's table with two references to the team table, a home team and an away team. Since there are two columns, naming them the conventional way, team_id, won't work.

What do I need to do to implement this in Rails both on the DB side and within my Games model?