From 51698cfa4d5faf7e9e710cba083c3dc28adaec96 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Fri, 23 Feb 2018 10:39:00 -0500 Subject: [PATCH] Better name for this association --- lib/chess/auth/user.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chess/auth/user.ex b/lib/chess/auth/user.ex index 2909073..5e8f22c 100644 --- a/lib/chess/auth/user.ex +++ b/lib/chess/auth/user.ex @@ -11,7 +11,7 @@ defmodule Chess.Auth.User do field :username, :string has_many :games, Chess.Store.Game - has_many :other_games, Chess.Store.Game, foreign_key: :opponent_id + has_many :games_as_opponent, Chess.Store.Game, foreign_key: :opponent_id timestamps() end