follow rubocop standards in domain_name_validator, remove unused line

This commit is contained in:
Georg Kahest 2017-04-11 00:39:34 +03:00
parent 40246bf081
commit c5081a1e6b

View file

@ -18,7 +18,6 @@ class DomainNameValidator < ActiveModel::EachValidator
return true if origins.include?(value)
general_domains = /(#{origins.join('|')})/
# general_domains = /(.pri.ee|.com.ee|.fie.ee|.med.ee|.ee)/
# it's punycode
if value[2] == '-' && value[3] == '-'
@ -39,7 +38,7 @@ class DomainNameValidator < ActiveModel::EachValidator
def validate_blocked(value)
return true unless value
return false if BlockedDomain.where(name: value).count > 0
ZonefileSetting.where(origin: value).count == 0
ZonefileSetting.where(origin: value).count.zero?
end
end
end