diff --git a/db/seeds.rb b/db/seeds.rb index 179d262..b2c317e 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -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