From 5df8714124625855ab9e3cc71b8fc864f0ec799c Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Mon, 13 May 2019 09:31:35 +0200 Subject: [PATCH] fixup evaluate_winner method match --- app/models/match.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/match.rb b/app/models/match.rb index 0c5e676..df8e8b7 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -31,6 +31,7 @@ class Match < ApplicationRecord private def evaluate_winner + return nil unless finished? return nil if match_scores.first.points == match_scores.second.points match_scores.max_by(&:points).team