fixup evaluate_winner method match
This commit is contained in:
parent
74282ea372
commit
5df8714124
|
|
@ -31,6 +31,7 @@ class Match < ApplicationRecord
|
||||||
private
|
private
|
||||||
|
|
||||||
def evaluate_winner
|
def evaluate_winner
|
||||||
|
return nil unless finished?
|
||||||
return nil if match_scores.first.points == match_scores.second.points
|
return nil if match_scores.first.points == match_scores.second.points
|
||||||
|
|
||||||
match_scores.max_by(&:points).team
|
match_scores.max_by(&:points).team
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue