From a31f6be3bde8d53c25610306288a5b36baa5fda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Miedes=20Garc=C3=A9s?= Date: Sat, 7 Jan 2017 22:16:17 +0100 Subject: [PATCH] Add proposal notifications to seeds --- db/dev_seeds.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index 0a4738987..347994a00 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -376,3 +376,12 @@ Proposal.last(3).each do |proposal| created_at: rand((Time.current - 1.week) .. Time.current)) puts " #{banner.title}" end + +puts "Creating proposal notifications" + +100.times do |i| + ProposalNotification.create!(title: "Proposal notification title #{i}", + body: "Proposal notification body #{i}", + author: User.reorder("RANDOM()").first, + proposal: Proposal.reorder("RANDOM()").first) +end