Create :stage_tournaments with realistic match positions
This commit is contained in:
parent
9f3fb532a5
commit
a710addde7
|
|
@ -34,6 +34,12 @@ FactoryBot.define do
|
||||||
match_count: -1,
|
match_count: -1,
|
||||||
match_type: evaluator.stage_count ? :running_playoff_match : :empty_prepared_playoff_match
|
match_type: evaluator.stage_count ? :running_playoff_match : :empty_prepared_playoff_match
|
||||||
)
|
)
|
||||||
|
tournament.stages.each do |stage|
|
||||||
|
stage.matches.each_with_index do |match, i|
|
||||||
|
match.position = i
|
||||||
|
match.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue