Add slug to Polls on dev seed rake
This commit is contained in:
@@ -4,25 +4,31 @@ require_dependency "poll/question/answer"
|
||||
section "Creating polls" do
|
||||
|
||||
Poll.create(name: I18n.t("seeds.polls.current_poll"),
|
||||
slug: I18n.t("seeds.polls.current_poll").parameterize,
|
||||
starts_at: 7.days.ago,
|
||||
ends_at: 7.days.from_now,
|
||||
geozone_restricted: false)
|
||||
|
||||
Poll.create(name: I18n.t("seeds.polls.current_poll_geozone_restricted"),
|
||||
slug: I18n.t("seeds.polls.current_poll_geozone_restricted").parameterize,
|
||||
starts_at: 5.days.ago,
|
||||
ends_at: 5.days.from_now,
|
||||
geozone_restricted: true,
|
||||
geozones: Geozone.reorder("RANDOM()").limit(3))
|
||||
|
||||
Poll.create(name: I18n.t("seeds.polls.recounting_poll"),
|
||||
slug: I18n.t("seeds.polls.recounting_poll").parameterize,
|
||||
starts_at: 15.days.ago,
|
||||
ends_at: 2.days.ago)
|
||||
|
||||
Poll.create(name: I18n.t("seeds.polls.expired_poll_without_stats"),
|
||||
slug: I18n.t("seeds.polls.expired_poll_without_stats").parameterize,
|
||||
|
||||
starts_at: 2.months.ago,
|
||||
ends_at: 1.month.ago)
|
||||
|
||||
Poll.create(name: I18n.t("seeds.polls.expired_poll_with_stats"),
|
||||
slug: I18n.t("seeds.polls.expired_poll_with_stats").parameterize,
|
||||
starts_at: 2.months.ago,
|
||||
ends_at: 1.month.ago,
|
||||
results_enabled: true,
|
||||
|
||||
Reference in New Issue
Block a user