Sha256: 2b4b848f2644064454b85356bbf69925a5c637018f9d15ca7564c6168a06c6e1

Contents?: true

Size: 547 Bytes

Versions: 7

Compression:

Stored size: 547 Bytes

Contents

# frozen_string_literal: true

if !Rails.env.production? || ENV.fetch("SEED", nil)
  print "Creating seeds for decidim-system...\n" unless Rails.env.test?

  password = ENV.fetch("DECIDIM_SYSTEM_USER_PASSWORD", "decidim123456789")

  Decidim::System::Admin.find_or_initialize_by(email: "system@example.org").update!(
    password:,
    password_confirmation: password
  )

  Decidim::Organization.find_each do |organization|
    Decidim::System::CreateDefaultPages.call(organization)
    Decidim::System::PopulateHelp.call(organization)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-system-0.28.4 db/seeds.rb
decidim-system-0.28.3 db/seeds.rb
decidim-system-0.28.2 db/seeds.rb
decidim-system-0.28.1 db/seeds.rb
decidim-system-0.28.0 db/seeds.rb
decidim-system-0.28.0.rc5 db/seeds.rb
decidim-system-0.28.0.rc4 db/seeds.rb