Class: Setting::DefaultHostgroup
- Inherits:
-
Setting
- Object
- Setting
- Setting::DefaultHostgroup
- Defined in:
- app/models/setting/default_hostgroup.rb
Overview
rubocop:disable Style/ClassAndModuleChildren
Class Method Summary collapse
Class Method Details
.load_defaults ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/models/setting/default_hostgroup.rb', line 6 def self.load_defaults # Check the table exists return unless ActiveRecord::Base.connection.table_exists?('settings') return unless super Setting.transaction do [ set('force_hostgroup_match', 'Apply hostgroup matching even if a host already has one.', false), set('force_hostgroup_match_only_new', 'Apply hostgroup matching only on new hosts', true), set('force_host_environment', "Apply hostgroup's environment to host even if a host already has a different one", true) ].compact.each { |s| create s.update(category: 'Setting::DefaultHostgroup') } end true end |