lib/decidim/initiatives/participatory_space.rb in decidim-initiatives-0.22.0 vs lib/decidim/initiatives/participatory_space.rb in decidim-initiatives-0.23.0
- old
+ new
@@ -98,9 +98,16 @@
end
initiative.add_to_index_as_search_resource
Decidim::Comments::Seed.comments_for(initiative)
+ Decidim::Attachment.create!(
+ title: Decidim::Faker::Localized.sentence(2),
+ description: Decidim::Faker::Localized.sentence(5),
+ attached_to: initiative,
+ file: File.new(File.join(seeds_root, "city.jpeg"))
+ )
+
Decidim::Initiatives.default_components.each do |component_name|
component = Decidim::Component.create!(
name: Decidim::Components::Namer.new(initiative.organization.available_locales, component_name).i18n_name,
manifest_name: component_name,
published_at: Time.current,