Sha256: 1bc6bad614272f54fe1f56c9e5b3640a0d1045c2f9f64ed4692e1ddc8a30cf86
Contents?: true
Size: 569 Bytes
Versions: 13
Compression:
Stored size: 569 Bytes
Contents
# frozen_string_literal: true User.as_anonymous_admin do JobTemplate.without_auditing do Dir[File.join("#{ForemanAcd::Engine.root}/app/views/templates/**/*.erb")].each do |template| sync = !Rails.env.test? && Setting[:remote_execution_sync_templates] template = JobTemplate.import_raw!(File.read(template), :default => true, :lock => true, :update => sync) template.organizations << Organization.unscoped.all if template&.organizations&.empty? template.locations << Location.unscoped.all if template&.locations&.empty? end end end
Version data entries
13 entries across 13 versions & 1 rubygems