108869472-archive

This commit is contained in:
Stas 2016-01-12 18:37:05 +02:00
parent a8ff887717
commit 9278e6703f
5 changed files with 171 additions and 39 deletions

View file

@ -38,7 +38,7 @@ class DomainNameValidator < ActiveModel::EachValidator
def validate_blocked(value)
return true unless value
return false if BlockedDomain.where("names @> ?::varchar[]", "{#{value}}").count > 0
return false if BlockedDomain.where(name: value).count > 0
ZonefileSetting.where(origin: value).count == 0
end
end