Add winner method to match

This commit is contained in:
Daniel Schädler 2019-05-10 12:01:34 +02:00
parent 4de6847edc
commit c8879c64df
1 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,11 @@ class Match < ApplicationRecord
stage ? stage.owner : group.owner
end
def winner
evaluate_winner
# This should maybe be cached or put into db
end
private
def evaluate_winner