Sha256: fd053318a082d89ebdc923d7f38eafd90dac83c99e7f9ff488dac5006d738b9b

Contents?: true

Size: 336 Bytes

Versions: 5

Compression:

Stored size: 336 Bytes

Contents

class OsDefaultTemplate < ActiveRecord::Base
  belongs_to :config_template
  belongs_to :template_kind
  belongs_to :operatingsystem
  validates_presence_of :config_template_id, :template_kind_id
  validates_uniqueness_of :template_kind_id, :scope => :operatingsystem_id

  def name
    "#{operatingsystem} - #{template_kind}"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/app/models/os_default_template.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/app/models/os_default_template.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/app/models/os_default_template.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/app/models/os_default_template.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/app/models/os_default_template.rb