module QuoVadis::Model::InstanceMethodsOnActivation
Attributes
password[R]
password_confirmation[R]
Public Instance Methods
password=(val)
click to toggle source
# File lib/quo_vadis/model.rb, line 43 def password=(val) @password = val build_qv_account unless qv_account raise PasswordExistsError if qv_account.password&.persisted? (qv_account.password || qv_account.build_password).password = val end
password_confirmation=(val)
click to toggle source
# File lib/quo_vadis/model.rb, line 50 def password_confirmation=(val) @password_confirmation = val build_qv_account unless qv_account (qv_account.password || qv_account.build_password).password_confirmation = val end
revoke_authentication_credentials()
click to toggle source
# File lib/quo_vadis/model.rb, line 56 def revoke_authentication_credentials qv_account.revoke end
Private Instance Methods
qv_copy_password_errors()
click to toggle source
# File lib/quo_vadis/model.rb, line 62 def qv_copy_password_errors qv_account.password.valid? # force qv_account.password to validate qv_account.password.errors[:password ].each { |message| errors.add :password, message } qv_account.password.errors[:password_confirmation].each { |message| errors.add :password_confirmation, message } end
qv_log_email_change()
click to toggle source
# File lib/quo_vadis/model.rb, line 68 def qv_log_email_change from, to = saved_change_to_email Log.create( account: qv_account, action: Log::EMAIL_CHANGE, ip: (CurrentRequestDetails.ip || ''), metadata: {from: from, to: to} ) end
qv_notify_email_change()
click to toggle source
# File lib/quo_vadis/model.rb, line 78 def qv_notify_email_change QuoVadis.notify :email_change_notification, email: saved_change_to_email[0] end