From a155d7d7e2b4f6469e14a81226c51d6519ce40d5 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Tue, 11 Dec 2018 16:31:20 +0100 Subject: [PATCH] Save Matches and Stages --- db/seeds.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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