Create Legislation::PeopleProposal model
This commit is contained in:
13
db/dev_seeds/legislation_people_proposals.rb
Normal file
13
db/dev_seeds/legislation_people_proposals.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
section "Creating legislation people proposals" do
|
||||
10.times do
|
||||
Legislation::PeopleProposal.create!(title: Faker::Lorem.sentence(3).truncate(60),
|
||||
description: Faker::Lorem.paragraphs.join("\n\n"),
|
||||
question: Faker::Lorem.sentence(3),
|
||||
summary: Faker::Lorem.paragraph,
|
||||
author: User.all.sample,
|
||||
process: Legislation::Process.all.sample,
|
||||
terms_of_service: "1",
|
||||
validated: rand <= 2.0 / 3,
|
||||
selected: rand <= 1.0 / 3)
|
||||
end
|
||||
end
|
||||
@@ -11,6 +11,8 @@ section "Creating collaborative legislation" do
|
||||
debate_end_date: Date.current + (i - 5).days,
|
||||
proposals_phase_start_date: Date.current + (i - 7).days,
|
||||
proposals_phase_end_date: Date.current + (i - 5).days,
|
||||
people_proposals_phase_start_date: Date.current + (i - 7).days,
|
||||
people_proposals_phase_end_date: Date.current + (i - 5).days,
|
||||
draft_publication_date: Date.current + (i - 3).days,
|
||||
allegations_start_date: Date.current + (i - 2).days,
|
||||
allegations_end_date: Date.current + (i - 1).days,
|
||||
@@ -20,6 +22,7 @@ section "Creating collaborative legislation" do
|
||||
draft_publication_enabled: true,
|
||||
result_publication_enabled: true,
|
||||
proposals_phase_enabled: true,
|
||||
people_proposals_phase_enabled: true,
|
||||
published: true)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user