Class: RailsSimpleAuth::AuthMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- RailsSimpleAuth::AuthMailer
- Defined in:
- app/mailers/rails_simple_auth/auth_mailer.rb
Instance Method Summary collapse
- #confirmation(user, token) ⇒ Object
- #magic_link(user, token) ⇒ Object
- #password_reset(user, token) ⇒ Object
Instance Method Details
#confirmation(user, token) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/mailers/rails_simple_auth/auth_mailer.rb', line 10 def confirmation(user, token) @user = user @token = token @confirmation_url = main_app.confirmation_url(token: token) # Use confirmable_email for reconfirmation (email change) scenarios recipient = user.respond_to?(:confirmable_email) ? user.confirmable_email : user.email mail( to: recipient, subject: 'Confirm your email' ) end |
#magic_link(user, token) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'app/mailers/rails_simple_auth/auth_mailer.rb', line 24 def magic_link(user, token) @user = user @token = token @magic_link_url = main_app.magic_link_url(token: token) mail( to: user.email, subject: 'Sign in to your account' ) end |
#password_reset(user, token) ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'app/mailers/rails_simple_auth/auth_mailer.rb', line 35 def password_reset(user, token) @user = user @token = token @password_reset_url = main_app.edit_password_url(token: token) mail( to: user.email, subject: 'Reset your password' ) end |