Save Matches and Stages
This commit is contained in:
parent
57faaa665e
commit
a155d7d7e2
|
|
@ -7,7 +7,7 @@ tournament = user.tournaments.create! name: Faker::Dog.name
|
|||
|
||||
@teams = []
|
||||
16.times do
|
||||
team = tournament.teams.create name: Faker::HarryPotter.character
|
||||
team = tournament.teams.create! name: Faker::HarryPotter.character
|
||||
@teams << team
|
||||
end
|
||||
4.times do |i|
|
||||
|
|
@ -20,5 +20,7 @@ end
|
|||
match.match_scores.create! team: @teams.sample, points: rand(10)
|
||||
match.position = j
|
||||
match.state = rand(7)
|
||||
match.save!
|
||||
end
|
||||
stage.save!
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue