diff --git a/app/models/tournament.rb b/app/models/tournament.rb index 6a52b62..d91ec72 100644 --- a/app/models/tournament.rb +++ b/app/models/tournament.rb @@ -17,7 +17,7 @@ class Tournament < ApplicationRecord after_initialize :generate_code def matches - stages.map(&:matches).flatten + [stages.map(&:matches), stages.map { |s| s.groups.map(&:matches) }].flatten end private