Class: Negroni::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Includes:
Negroni::Mailers::Helpers
Defined in:
app/mailers/negroni/mailer.rb,
app/mailers/negroni/mailer.rb

Overview

The base mailer for all emails

Instance Method Summary collapse

Instance Method Details

#password_change(record, options = {}) ⇒ Object

Sends ‘record` a notification of password changes

Parameters:

  • record (Object, #email)

    the record to send instructions

  • options (Hash) (defaults to: {})

    a hash of options for the mail



40
41
42
# File 'app/mailers/negroni/mailer.rb', line 40

def password_change(record, options = {})
  negroni_mail(record, :password_change, options)
end

#reset_password_instructions(record, token, options = {}) ⇒ Object

Sends ‘record` instructions to reset their password using `token`

Parameters:

  • record (Object, #email)

    the record to send instructions

  • token (String)

    the token needed to reset the password

  • options (Hash) (defaults to: {})

    a hash of options for the mail



19
20
21
22
# File 'app/mailers/negroni/mailer.rb', line 19

def reset_password_instructions(record, token, options = {})
  @token = token
  negroni_mail(record, :reset_password_instructions, options)
end

#unlock_instructions(record, token, options = {}) ⇒ Object

Sends ‘record` instructions to unlock their account using `token`

Parameters:

  • record (Object, #email)

    the record to send instructions

  • token (String)

    the token needed to reset the password

  • options (Hash) (defaults to: {})

    a hash of options for the mail



30
31
32
33
# File 'app/mailers/negroni/mailer.rb', line 30

def unlock_instructions(record, token, options = {})
  @token = token
  negroni_mail(record, :unlock_instructions, options)
end