Allow display the budgets created in dev seeds

Since this PR (Refactor participatory budgets in draft mode #4369) budgets
have a new field "published" to manage whether they  are displayed or not. We
update this field in dev_seeds to be able to display budgets on the public page
budgets.
This commit is contained in:
taitus
2021-03-17 08:40:04 +01:00
parent 313c9eaeba
commit 485d3f8dea

View File

@@ -29,14 +29,16 @@ section "Creating Budgets" do
name_en: "#{I18n.t("seeds.budgets.budget", locale: :en)} #{Date.current.year - 1}",
name_es: "#{I18n.t("seeds.budgets.budget", locale: :es)} #{Date.current.year - 1}",
currency_symbol: I18n.t("seeds.budgets.currency"),
phase: "finished"
phase: "finished",
published: true
)
Budget.create!(
name_en: "#{I18n.t("seeds.budgets.budget", locale: :en)} #{Date.current.year}",
name_es: "#{I18n.t("seeds.budgets.budget", locale: :es)} #{Date.current.year}",
currency_symbol: I18n.t("seeds.budgets.currency"),
phase: "accepting"
phase: "accepting",
published: true
)
Budget.find_each do |budget|