Return all matches also from groups
This commit is contained in:
parent
a6b7a905a0
commit
33ccab8988
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue