diff --git a/app/models/match.rb b/app/models/match.rb index 6914310..0c5e676 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -24,6 +24,10 @@ class Match < ApplicationRecord # This should maybe be cached or put into db end + def group_match? + group.present? + end + private def evaluate_winner @@ -35,8 +39,4 @@ class Match < ApplicationRecord def stage_xor_group errors.add(:stage_xor_group, 'Stage and Group missing or both present') unless stage.present? ^ group.present? end - - def group_match? - group.present? - end end diff --git a/app/services/playoff_stage_service.rb b/app/services/playoff_stage_service.rb index 340a9a2..ed0e19a 100644 --- a/app/services/playoff_stage_service.rb +++ b/app/services/playoff_stage_service.rb @@ -70,4 +70,11 @@ class PlayoffStageService stage_count.to_int end end + + def self.populate_match_below(match) + current_stage = match.stage + next_stage = match.stage.tournament.stages. + + puts + end end