Merge branch 'master' into proposal-dashboard
This commit is contained in:
@@ -127,7 +127,7 @@ section "Creating Investments" do
|
||||
group: heading.group,
|
||||
budget: heading.group.budget,
|
||||
title: Faker::Lorem.sentence(3).truncate(60),
|
||||
description: "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>",
|
||||
description: "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>",
|
||||
created_at: rand((Time.current - 1.week)..Time.current),
|
||||
feasibility: %w[undecided unfeasible feasible feasible feasible feasible].sample,
|
||||
unfeasibility_explanation: Faker::Lorem.paragraph,
|
||||
|
||||
@@ -2,7 +2,7 @@ section "Creating Debates" do
|
||||
tags = Faker::Lorem.words(25)
|
||||
30.times do
|
||||
author = User.all.sample
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||
Debate.create!(author: author,
|
||||
title: Faker::Lorem.sentence(3).truncate(60),
|
||||
created_at: rand((Time.current - 1.week)..Time.current),
|
||||
@@ -15,7 +15,7 @@ section "Creating Debates" do
|
||||
tags = ActsAsTaggableOn::Tag.where(kind: "category")
|
||||
30.times do
|
||||
author = User.all.sample
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||
Debate.create!(author: author,
|
||||
title: Faker::Lorem.sentence(3).truncate(60),
|
||||
created_at: rand((Time.current - 1.week)..Time.current),
|
||||
|
||||
@@ -2,7 +2,7 @@ section "Creating comment notifications" do
|
||||
User.find_each do |user|
|
||||
debate = Debate.create!(author: user,
|
||||
title: Faker::Lorem.sentence(3).truncate(60),
|
||||
description: "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>",
|
||||
description: "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>",
|
||||
tag_list: ActsAsTaggableOn::Tag.all.sample(3).join(","),
|
||||
geozone: Geozone.reorder("RANDOM()").first,
|
||||
terms_of_service: "1")
|
||||
|
||||
@@ -52,8 +52,8 @@ section "Creating Poll Questions & Answers" do
|
||||
end
|
||||
end
|
||||
question.save!
|
||||
Faker::Lorem.words((2..4).to_a.sample).each_with_index do |title, index|
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
||||
Faker::Lorem.words((2..4).to_a.sample).each do |title|
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||
answer = Poll::Question::Answer.new(question: question,
|
||||
title: title.capitalize,
|
||||
description: description,
|
||||
|
||||
@@ -25,7 +25,7 @@ section "Creating Proposals" do
|
||||
tags = Faker::Lorem.words(25)
|
||||
30.times do
|
||||
author = User.all.sample
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||
proposal = Proposal.create!(author: author,
|
||||
title: Faker::Lorem.sentence(3).truncate(60),
|
||||
question: Faker::Lorem.sentence(3) + "?",
|
||||
@@ -47,7 +47,7 @@ section "Creating Archived Proposals" do
|
||||
tags = Faker::Lorem.words(25)
|
||||
5.times do
|
||||
author = User.all.sample
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||
months_to_archive_proposals = Setting["months_to_archive_proposals"]
|
||||
proposal = Proposal.create!(author: author,
|
||||
title: Faker::Lorem.sentence(3).truncate(60),
|
||||
@@ -70,7 +70,7 @@ section "Creating Successful Proposals" do
|
||||
tags = Faker::Lorem.words(25)
|
||||
10.times do
|
||||
author = User.all.sample
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||
proposal = Proposal.create!(author: author,
|
||||
title: Faker::Lorem.sentence(3).truncate(60),
|
||||
question: Faker::Lorem.sentence(3) + "?",
|
||||
|
||||
@@ -3,8 +3,8 @@ section "Creating Spending Proposals" do
|
||||
60.times do
|
||||
geozone = Geozone.all.sample
|
||||
author = User.all.sample
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
||||
feasible_explanation = "<p>#{Faker::Lorem.paragraphs.join('</p><p>')}</p>"
|
||||
description = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||
feasible_explanation = "<p>#{Faker::Lorem.paragraphs.join("</p><p>")}</p>"
|
||||
valuation_finished = [true, false].sample
|
||||
feasible = [true, false].sample
|
||||
created_at = rand((Time.current - 1.week)..Time.current)
|
||||
|
||||
Reference in New Issue
Block a user