Sha256: 8ee2811cea378d1887977225ebf8b7056a83c0483cf836ccd761c0f716cc6f95

Contents?: true

Size: 576 Bytes

Versions: 47

Compression:

Stored size: 576 Bytes

Contents

module ForemanPuppet
  class HostgroupClass < ApplicationRecord
    self.table_name = 'hostgroup_classes'

    audited associated_with: :hostgroup
    include Authorizable

    belongs_to :puppetclass
    belongs_to :hostgroup_puppet_facet
    has_one :hostgroup, through: :hostgroup_puppet_facet

    validates :hostgroup_puppet_facet, presence: true
    validates :puppetclass_id, presence: true, uniqueness: { scope: :hostgroup_puppet_facet_id }

    def name
      "#{hostgroup} - #{puppetclass}"
    end

    def check_permissions_after_save
      true
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
foreman_puppet-8.0.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-6.4.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-7.0.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-6.3.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-6.2.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-6.1.1 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-5.1.3 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-6.1.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-6.0.1 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-6.0.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-5.1.2 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-4.1.1 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-5.1.1 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-5.1.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-4.1.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-4.0.4 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-5.0.0 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-4.0.3 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-4.0.2 app/models/foreman_puppet/hostgroup_class.rb
foreman_puppet-3.0.7 app/models/foreman_puppet/hostgroup_class.rb