Fixes dev seeds

This commit is contained in:
Alberto Garcia Cabeza
2016-05-23 16:53:36 +02:00
parent 8954ea6cb5
commit cdf3011a45

View File

@@ -326,10 +326,10 @@ Proposal.last(3).each do |proposal|
description = Faker::Lorem.sentence(word_count = 12)
banner = Banner.create!(title: title,
description: description,
style: ["banner-style.banner-style-one", "banner-style.banner-style-two",
"banner-style.banner-style-three"].sample,
image: ["banner-img.banner-img-one", "banner-img.banner-img-two",
"banner-img.banner-img-three"].sample,
style: ["banner-style banner-style-one", "banner-style banner-style-two",
"banner-style banner-style-three"].sample,
image: ["banner-img banner-img-one", "banner-img banner-img-two",
"banner-img banner-img-three"].sample,
target_url: Rails.application.routes.url_helpers.proposal_path(proposal),
post_started_at: rand((Time.now - 1.week) .. (Time.now - 1.day)),
post_ended_at: rand((Time.now - 1.day) .. (Time.now + 1.week)),