Add and apply Rails/WhereNot rubocop rule
We simplify the code a little bit, and make it more consistent since we were already using `where.not` in most places.
This commit is contained in:
@@ -2,7 +2,7 @@ class Verification::Management::ManagedUser
|
||||
include ActiveModel::Model
|
||||
|
||||
def self.find(document_type, document_number)
|
||||
User.where("document_number is not null").
|
||||
User.where.not(document_number: nil).
|
||||
find_or_initialize_by(document_type: document_type,
|
||||
document_number: document_number)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user