optimize code
This commit is contained in:
@@ -57,6 +57,8 @@
|
||||
|
||||
before_validation :clean_document_number
|
||||
|
||||
before_create :set_password_changed_at
|
||||
|
||||
# Get the existing user by email if the provider gives us a verified email.
|
||||
def self.first_or_initialize_for_oauth(auth)
|
||||
oauth_email = auth.info.email
|
||||
@@ -240,6 +242,10 @@
|
||||
true
|
||||
end
|
||||
|
||||
def set_password_changed_at
|
||||
set_password_changed_at = created_at
|
||||
end
|
||||
|
||||
def ability
|
||||
@ability ||= Ability.new(self)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user