Class: Setting::ForemanHostExtraValidator
- Defined in:
- app/models/setting/foreman_host_extra_validator.rb
Class Method Summary collapse
Class Method Details
.load_defaults ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/models/setting/foreman_host_extra_validator.rb', line 3 def self.load_defaults # Check the table exists return unless super self.transaction do [ self.set('host_name_validation_regex', _('Default regex the name of a host is validated against'), '^[a-zA-Z0-9\-_]+$') ].compact.each { |s| self.create! s.update(:category => 'Setting::ForemanHostExtraValidator') } end true end |