mirror of
https://github.com/internetee/registry.git
synced 2025-07-26 04:28:27 +02:00
111297422-validation_method_fix
This commit is contained in:
parent
1370a5f0fe
commit
830afc0e0e
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue