Return a "winner" for :single_team matches
This commit is contained in:
parent
8e3325bbfc
commit
36db03293e
|
|
@ -28,6 +28,8 @@ class Match < ApplicationRecord
|
|||
end
|
||||
|
||||
def winner
|
||||
return teams.first if single_team?
|
||||
|
||||
finished? ? current_leading_team : nil
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue