From 37be890fbeaccd3343e7b03007656f9e507af533 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Tue, 19 Sep 2017 19:39:47 +0200 Subject: [PATCH] Fixes dev seeds Poll::Questions now have a validation for a `poll_id` --- db/dev_seeds.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index f81e82be0..d43293055 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -585,7 +585,7 @@ print "Creating Poll Questions from Proposals" 3.times do proposal = Proposal.reorder("RANDOM()").first poll = Poll.current.first - question = Poll::Question.create(valid_answers: "Yes, No") + question = Poll::Question.create(valid_answers: "Yes, No", poll: poll) question.copy_attributes_from_proposal(proposal) question.save! end @@ -596,7 +596,7 @@ print "Creating Successful Proposals" 10.times do proposal = Proposal.reorder("RANDOM()").first poll = Poll.current.first - question = Poll::Question.create(valid_answers: "Yes, No") + question = Poll::Question.create(valid_answers: "Yes, No", poll: poll) question.copy_attributes_from_proposal(proposal) question.save! end