Return a "winner" for :single_team matches

This commit is contained in:
Daniel Schädler 2019-06-12 20:39:09 +02:00
parent 8e3325bbfc
commit 36db03293e
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,8 @@ class Match < ApplicationRecord
end end
def winner def winner
return teams.first if single_team?
finished? ? current_leading_team : nil finished? ? current_leading_team : nil
end end