Project

General

Profile

« Previous | Next » 

Revision f4459c11

Added by David Davis about 8 years ago

Refs #3809 - Turning on some rubocop cops

View differences:

app/models/nic/interface.rb
self.name = fqdn
# A managed host we should know the domain for; and the shortname shouldn't include a period
# This only applies for unattended=true, as otherwise the name field includes the domain
errors.add(:name, _("must not include periods")) if ( host && host.managed? && managed? && shortname.include?(".") && SETTINGS[:unattended] )
errors.add(:name, _("must not include periods")) if (host && host.managed? && managed? && shortname.include?(".") && SETTINGS[:unattended])
self.name = Net::Validations.normalize_hostname(name) if self.name.present?
end
end

Also available in: Unified diff