lib/decidim/pages/feature.rb in decidim-pages-0.0.5 vs lib/decidim/pages/feature.rb in decidim-pages-0.0.6

- old
+ new

@@ -25,10 +25,14 @@ feature.settings(:step) do |settings| settings.attribute :comments_blocked, type: :boolean, default: false end + feature.register_resource do |resource| + resource.model_class_name = "Decidim::Pages::Page" + end + feature.seeds do Decidim::ParticipatoryProcess.all.each do |process| next unless process.steps.any? feature = Decidim::Feature.create!( @@ -38,10 +42,9 @@ participatory_process: process ) page = Decidim::Pages::Page.create!( feature: feature, - title: Decidim::Faker::Localized.sentence(2), body: Decidim::Faker::Localized.wrapped("<p>", "</p>") do Decidim::Faker::Localized.paragraph(3) end )