lib/decidim/initiatives/participatory_space.rb in decidim-initiatives-0.23.6 vs lib/decidim/initiatives/participatory_space.rb in decidim-initiatives-0.24.0.rc1
- old
+ new
@@ -54,12 +54,12 @@
published_at: Time.current
)
3.times do |n|
type = Decidim::InitiativesType.create!(
- title: Decidim::Faker::Localized.sentence(5),
- description: Decidim::Faker::Localized.sentence(25),
+ title: Decidim::Faker::Localized.sentence(word_count: 5),
+ description: Decidim::Faker::Localized.sentence(word_count: 25),
organization: organization,
banner_image: File.new(File.join(seeds_root, "city2.jpeg"))
)
organization.top_scopes.each do |scope|
@@ -74,12 +74,12 @@
Decidim::Initiative.states.keys.each do |state|
Decidim::Initiative.skip_callback(:save, :after, :notify_state_change, raise: false)
Decidim::Initiative.skip_callback(:create, :after, :notify_creation, raise: false)
params = {
- title: Decidim::Faker::Localized.sentence(3),
- description: Decidim::Faker::Localized.sentence(25),
+ title: Decidim::Faker::Localized.sentence(word_count: 3),
+ description: Decidim::Faker::Localized.sentence(word_count: 25),
scoped_type: Decidim::InitiativesTypeScope.reorder(Arel.sql("RANDOM()")).first,
state: state,
signature_type: "online",
signature_start_date: Date.current - 7.days,
signature_end_date: Date.current + 7.days,
@@ -99,11 +99,11 @@
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),
+ title: Decidim::Faker::Localized.sentence(word_count: 2),
+ description: Decidim::Faker::Localized.sentence(word_count: 5),
attached_to: initiative,
file: File.new(File.join(seeds_root, "city.jpeg"))
)
Decidim::Initiatives.default_components.each do |component_name|