Bug #708 ยป 0001-Perform-case-insensitive-match-when-checking-if-host.patch
app/models/host.rb | ||
---|---|---|
self.domain = Domain.all.select{|d| name.match(d.name)}.first rescue nil
|
||
else
|
||
# if our host is in short name, append the domain name
|
||
self.name += ".#{domain}" unless name =~ /.#{domain}$/
|
||
self.name += ".#{domain}" unless name =~ /.#{domain}$/i
|
||
end
|
||
end
|
||
end
|