Class: PasswordMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- PasswordMailer
- Includes:
- Login::MailConfig
- Defined in:
- app/models/password_mailer.rb
Class Method Summary collapse
- .handle_user_password_reset_requested!(event) ⇒ Object
- .handle_user_password_updated!(event) ⇒ Object
Instance Method Summary collapse
Class Method Details
.handle_user_password_reset_requested!(event) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/models/password_mailer.rb', line 7 def handle_user_password_reset_requested!(event) deliver_reset_password_email( :user => event.object, :from => site(event.source.site).email_from, :reset_link => password_reset_link(event.source, event.token), :token => event.token ) end |
.handle_user_password_updated!(event) ⇒ Object
16 17 18 19 20 21 |
# File 'app/models/password_mailer.rb', line 16 def handle_user_password_updated!(event) deliver_updated_password_email( :user => event.object, :from => site(event.source.site).email_from ) end |
Instance Method Details
#reset_password_email(attributes = {}) ⇒ Object
30 31 32 33 34 35 |
# File 'app/models/password_mailer.rb', line 30 def reset_password_email(attributes = {}) recipients attributes[:user].email from attributes[:from] subject I18n.t(:'adva.passwords.notifications.reset_password.subject') body attributes end |
#updated_password_email(attributes = {}) ⇒ Object
37 38 39 40 41 42 |
# File 'app/models/password_mailer.rb', line 37 def updated_password_email(attributes = {}) recipients attributes[:user].email from attributes[:from] subject I18n.t(:'adva.passwords.notifications.password_updated.subject') body attributes end |