Sha256: 9957e2b61470ee9b47c032b1b85e67415d42b6e30f570bbe8775b31a2b2d270d

Contents?: true

Size: 702 Bytes

Versions: 146

Compression:

Stored size: 702 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_options = Rails::VERSION::MAJOR < 5 ? {} : { :raise => false }
      skip_callback :create, :after, :assign_default_templates, skip_options
      before_create :assign_default_templates
    end
  end
end

Version data entries

146 entries across 146 versions & 1 rubygems

Version Path
foreman_remote_execution-14.1.4 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-14.1.3 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-14.1.2 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-14.1.1 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-14.1.0 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-14.0.2 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-14.0.1 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-13.2.6 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-14.0.0 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-13.2.5 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-13.2.4 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-13.2.3 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-13.2.2 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-12.0.7 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-13.2.1 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-13.2.0 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-10.1.3 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-13.0.0 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-12.0.5 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
foreman_remote_execution-12.0.4 app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb