Add proposal notifications to seeds

This commit is contained in:
Alberto Miedes Garcés
2017-01-07 22:16:17 +01:00
parent 1e95cdfce3
commit a31f6be3bd

View File

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