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-6.0.44 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.43 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-4.0.36 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-3.0.33 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-6.0.42.2 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-6.0.42.1 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-6.0.43 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.42 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-6.0.42 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.41 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.39 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.38 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-4.0.35 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.37 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.36 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.35 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.34 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-5.0.33 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-3.0.32 db/seeds.d/50_job_templates.rb
foreman_rh_cloud-4.0.32 db/seeds.d/50_job_templates.rb