Fix Rubocop issues after Ruby upgrade

This commit is contained in:
Maciej Szlosarczyk 2018-04-27 15:01:39 +03:00
parent 3c1125879c
commit 15a651e51b
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
18 changed files with 25 additions and 26 deletions

View file

@ -37,7 +37,7 @@ class DomainNameValidator < ActiveModel::EachValidator
def validate_blocked(value)
return true unless value
return false if BlockedDomain.where(name: value).count > 0
return false if BlockedDomain.where(name: value).count.positive?
DNS::Zone.where(origin: value).count.zero?
end
end