Save Matches and Stages

This commit is contained in:
Daniel Schädler 2018-12-11 16:31:20 +01:00
parent 57faaa665e
commit a155d7d7e2
1 changed files with 3 additions and 1 deletions

View File

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