Compare domains instead of strings

Fixes #1291
This commit is contained in:
Artur Beljajev 2019-09-09 14:32:43 +03:00
parent a0212490d4
commit 6aa25456f5
2 changed files with 9 additions and 1 deletions

View file

@ -81,7 +81,7 @@ class Nameserver < ActiveRecord::Base
def glue_record_required?
return unless hostname? && domain
hostname.end_with?(domain.name)
DomainName(hostname).domain == domain.name
end
def normalize_attributes