Sha256: 233eee0146b3dded5e318108b39362baf612d5aabeaf153d01de425242a95b70

Contents?: true

Size: 513 Bytes

Versions: 68

Compression:

Stored size: 513 Bytes

Contents

organizations = Organization.unscoped.all
locations = Location.unscoped.all
User.as_anonymous_admin do
  JobTemplate.without_auditing do
    Dir[File.join("#{ForemanRhCloud::Engine.root}/app/views/job_templates/**/*.erb")].each do |template|
      template = JobTemplate.import_raw!(File.read(template),
      :default => true,
      :lock => true,
      :update => true)
      template.organizations = organizations if template.present?
      template.locations = locations if template.present?
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
foreman_rh_cloud-9.0.55 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-9.0.54 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-9.0.53 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-9.0.52 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-8.0.52 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-9.0.51 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-8.0.51 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-7.0.48 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-7.0.47 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-8.0.50 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-8.0.49 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-8.0.48 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-8.0.47 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-8.0.46 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-6.0.45 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.46 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.45 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-7.0.46 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.44 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-7.0.45 db/seeds.d/50_job_templates.rb