In my application a user has a roster of players for specific games in the form of a pick model. I also have game stats for a player for a specific game. I want to create a relationship where a pick has_one game stat for the purpose of using includes to eager load the game_stats for a pick.
Is there a way to create a relationship between tables that share multiple foreign keys from other models?
Here is what I’m going for:
id, game_id, player_id
id, game_id, player_id, stats