decidim-surveys/lib/decidim/surveys/feature.rb in decidim-0.3.2 vs decidim-surveys/lib/decidim/surveys/feature.rb in decidim-0.4.0
- old
+ new
@@ -51,11 +51,11 @@
exports.serializer Decidim::Surveys::SurveyUserAnswersSerializer
end
feature.seeds do
- Decidim::ParticipatoryProcess.all.each do |process|
+ Decidim::ParticipatoryProcess.find_each do |process|
next unless process.steps.any?
feature = Decidim::Feature.create!(
name: Decidim::Features::Namer.new(process.organization.available_locales, :surveys).i18n_name,
manifest_name: :surveys,
@@ -75,10 +75,11 @@
)
3.times do
Decidim::Surveys::SurveyQuestion.create!(
survey: survey,
- body: Decidim::Faker::Localized.paragraph
+ body: Decidim::Faker::Localized.paragraph,
+ question_type: "short_answer"
)
end
end
end
end