Add winner method to match

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

View File

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