mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
* Change email address * Email confirmation * Email change test * Lint * Schema reset * Set test email sender * Select specific user fixture * Refactor/cleanup * Remove unused email_confirmation_token * Current user would never be true * Fix translation test failures
15 lines
490 B
Ruby
15 lines
490 B
Ruby
class EmailConfirmationMailer < ApplicationMailer
|
|
# Subject can be set in your I18n file at config/locales/en.yml
|
|
# with the following lookup:
|
|
#
|
|
# en.email_confirmation_mailer.confirmation_email.subject
|
|
#
|
|
def confirmation_email
|
|
@user = params[:user]
|
|
@subject = t(".subject")
|
|
@cta = t(".cta")
|
|
@confirmation_url = new_email_confirmation_url(token: @user.generate_token_for(:email_confirmation))
|
|
|
|
mail to: @user.unconfirmed_email, subject: @subject
|
|
end
|
|
end
|