Simplify creating web sections in seeds

This commit is contained in:
Javi Martín
2021-01-14 14:51:31 +01:00
parent 68b32f2a84
commit 885a9ad765

View File

@@ -1,5 +1,3 @@
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!
%w[homepage debates proposals budgets help_page].each do |section|
WebSection.where(name: section).first_or_create!
end