Class: Incline::UserMailer
- Inherits:
-
ApplicationMailerBase
- Object
- ActionMailer::Base
- ApplicationMailerBase
- Incline::UserMailer
- Defined in:
- app/mailers/incline/user_mailer.rb
Overview
This mailer is used for the account activation, password reset, and invalid password reset messages.
Instance Method Summary collapse
-
#account_activation(data = {}) ⇒ Object
Sends the activation email to a new user.
-
#invalid_password_reset(data = {}) ⇒ Object
Sends an invalid password reset attempt message to a user whether they exist or not.
-
#password_reset(data = {}) ⇒ Object
Sends the password reset email to an existing user.
Instance Method Details
#account_activation(data = {}) ⇒ Object
Sends the activation email to a new user.
11 12 13 14 15 16 17 18 |
# File 'app/mailers/incline/user_mailer.rb', line 11 def account_activation(data = {}) @data = { user: nil, client_ip: '0.0.0.0' }.merge(data || {}) raise unless data[:user] mail to: data[:user].email, subject: 'Account activation' end |
#invalid_password_reset(data = {}) ⇒ Object
Sends an invalid password reset attempt message to a user whether they exist or not.
33 34 35 36 37 38 39 40 41 |
# File 'app/mailers/incline/user_mailer.rb', line 33 def invalid_password_reset(data = {}) @data = { email: nil, message: 'This email address is not associated with an existing account.', client_ip: '0.0.0.0' }.merge(data || {}) raise unless data[:email] mail to: data[:email], subject: 'Password reset request' end |
#password_reset(data = {}) ⇒ Object
Sends the password reset email to an existing user.
22 23 24 25 26 27 28 29 |
# File 'app/mailers/incline/user_mailer.rb', line 22 def password_reset(data = {}) @data = { user: nil, client_ip: '0.0.0.0' }.merge(data || {}) raise unless data[:user] mail to: data[:user].email, subject: 'Password reset request' end |