Return all matches also from groups

This commit is contained in:
Daniel Schädler 2019-10-26 00:32:14 +02:00
parent a6b7a905a0
commit 33ccab8988
1 changed files with 1 additions and 1 deletions

View File

@ -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