Return a "winner" for :single_team matches
This commit is contained in:
parent
8e3325bbfc
commit
36db03293e
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue