Files
nairobi/db/dev_seeds/legislation_proposals.rb
Javi Martín 102cf74b3d Bump faker from 1.8.7 to 2.0
Since version 2.0 introduced many breaking changes, we're upgrading to
it first.

The changes have been done by installing the rubocop-faker gem and
running:

```
rubocop \
  --require rubocop-faker \
  --only Faker/DeprecatedArguments \
  --auto-correct
```
2021-08-13 04:39:44 +02:00

12 lines
565 B
Ruby

section "Creating legislation proposals" do
10.times do
Legislation::Proposal.create!(title: Faker::Lorem.sentence(word_count: 3).truncate(60),
description: Faker::Lorem.paragraphs.join("\n\n"),
summary: Faker::Lorem.paragraph,
author: User.all.sample,
process: Legislation::Process.all.sample,
terms_of_service: "1",
selected: rand <= 1.0 / 3)
end
end