From 7f59d6fb0ecddc79f7cd8592ceb835d3b518a391 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Wed, 28 Nov 2018 18:07:01 +0100 Subject: [PATCH] Delegate Score.owner to parent team --- app/models/match_score.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/match_score.rb b/app/models/match_score.rb index 4d7f9bf..408952d 100644 --- a/app/models/match_score.rb +++ b/app/models/match_score.rb @@ -3,4 +3,6 @@ class MatchScore < ApplicationRecord belongs_to :match belongs_to :team + + delegate :owner, to: :team end