Sha256: c4c4de9566fd7115025c0bebc76c20438dc2a81fe7288385378250b19f08e6ec

Contents?: true

Size: 631 Bytes

Versions: 2

Compression:

Stored size: 631 Bytes

Contents

module ForemanRemoteExecution
  module TaxonomyExtensions
    extend ActiveSupport::Concern

    included do
      has_many :job_templates, :through => :taxable_taxonomies, :source => :taxable, :source_type => 'JobTemplate'

      # TODO: on foreman_version_bump
      # workaround for #11805 - use before_create for setting
      # the default templates, remove after it's fixed in upstream
      # (https://github.com/theforeman/foreman/pull/4890) and gets
      # into a 1.17 release
      skip_callback :create, :after, :assign_default_templates, :raise => false
      before_create :assign_default_templates
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_remote_execution-1.3.5 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-1.3.4 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb