refactors managed user info into management layout
This commit is contained in:
12
app/models/verification/management/managed_user.rb
Normal file
12
app/models/verification/management/managed_user.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class Verification::Management::ManagedUser
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :user
|
||||
|
||||
def self.find(document_type, document_number)
|
||||
User.where('document_number is not null').
|
||||
find_or_initialize_by(document_type: document_type,
|
||||
document_number: document_number)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user