Merge pull request #3658 from consul/fix_web_section_seeds

Make WebSection seeds idempotent
This commit is contained in:
Javier Martín
2019-08-07 03:06:34 +02:00
committed by GitHub

View File

@@ -9,11 +9,11 @@ end
Setting.reset_defaults
WebSection.create(name: "homepage")
WebSection.create(name: "debates")
WebSection.create(name: "proposals")
WebSection.create(name: "budgets")
WebSection.create(name: "help_page")
WebSection.where(name: "homepage").first_or_create
WebSection.where(name: "debates").first_or_create
WebSection.where(name: "proposals").first_or_create
WebSection.where(name: "budgets").first_or_create
WebSection.where(name: "help_page").first_or_create
# Default custom pages
load Rails.root.join("db", "pages.rb")