Class: BetterAuthy::PasswordResetMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/better_authy/password_reset_mailer.rb

Instance Method Summary collapse

Instance Method Details

#reset_password_instructions(resource, token, scope_name) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/mailers/better_authy/password_reset_mailer.rb', line 7

def reset_password_instructions(resource, token, scope_name)
  @resource = resource
  @token = token
  @scope_name = scope_name
  @scope_config = BetterAuthy.scope_for!(scope_name)
  @reset_url = send(:"edit_#{scope_name}_password_url", token: token)

  mail(
    to: resource.email,
    subject: I18n.t("better_authy.passwords.mailer.subject")
  )
end