mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
follow rubocop standards in domain_name_validator, remove unused line
This commit is contained in:
parent
40246bf081
commit
c5081a1e6b
1 changed files with 1 additions and 2 deletions
|
@ -18,7 +18,6 @@ class DomainNameValidator < ActiveModel::EachValidator
|
||||||
return true if origins.include?(value)
|
return true if origins.include?(value)
|
||||||
|
|
||||||
general_domains = /(#{origins.join('|')})/
|
general_domains = /(#{origins.join('|')})/
|
||||||
# general_domains = /(.pri.ee|.com.ee|.fie.ee|.med.ee|.ee)/
|
|
||||||
|
|
||||||
# it's punycode
|
# it's punycode
|
||||||
if value[2] == '-' && value[3] == '-'
|
if value[2] == '-' && value[3] == '-'
|
||||||
|
@ -39,7 +38,7 @@ class DomainNameValidator < ActiveModel::EachValidator
|
||||||
def validate_blocked(value)
|
def validate_blocked(value)
|
||||||
return true unless value
|
return true unless value
|
||||||
return false if BlockedDomain.where(name: value).count > 0
|
return false if BlockedDomain.where(name: value).count > 0
|
||||||
ZonefileSetting.where(origin: value).count == 0
|
ZonefileSetting.where(origin: value).count.zero?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue