Fix Rails/WhereExists cop in User model (#28792)
This commit is contained in:
1 parent
81e4e65610
commit
9fb9ef418a
2 files changed
+1
-2
No files matched your search
+1
-1
@@ -434,7 +434,7 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def sign_up_from_ip_requires_approval?
|
||||
!sign_up_ip.nil? && IpBlock.where(severity: :sign_up_requires_approval).where('ip >>= ?', sign_up_ip.to_s).exists?
|
||||
sign_up_ip.present? && IpBlock.sign_up_requires_approval.exists?(['ip >>= ?', sign_up_ip.to_s])
|
||||
end
|
||||
|
||||
def sign_up_email_requires_approval?
|
||||
|
||||
Reference in new issue
Block a user