Class: RodauthMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- RodauthMailer
- Defined in:
- lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb
Instance Method Summary collapse
- #password_changed(account_id) ⇒ Object
- #reset_password(account_id, key) ⇒ Object
- #verify_account(account_id, key) ⇒ Object
- #verify_login_change(account_id, old_login, new_login, key) ⇒ Object
Instance Method Details
#password_changed(account_id) ⇒ Object
25 26 27 28 29 |
# File 'lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb', line 25 def password_changed(account_id) @account = Account.find(account_id) mail to: @account.email, subject: rodauth.password_changed_email_subject end |
#reset_password(account_id, key) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb', line 9 def reset_password(account_id, key) @email_link = rodauth.reset_password_url(key: email_token(account_id, key)) @account = Account.find(account_id) mail to: @account.email, subject: rodauth.reset_password_email_subject end |
#verify_account(account_id, key) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb', line 2 def verify_account(account_id, key) @email_link = rodauth.verify_account_url(key: email_token(account_id, key)) @account = Account.find(account_id) mail to: @account.email, subject: rodauth.verify_account_email_subject end |
#verify_login_change(account_id, old_login, new_login, key) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb', line 16 def verify_login_change(account_id, old_login, new_login, key) @old_login = old_login @new_login = new_login @email_link = rodauth.verify_login_change_url(key: email_token(account_id, key)) @account = Account.find(account_id) mail to: new_login, subject: rodauth.verify_login_change_email_subject end |