Class: IuguMailer

Inherits:
Devise::Mailer
  • Object
show all
Defined in:
app/mailers/iugu_mailer.rb

Instance Method Summary collapse

Instance Method Details

#invitation(user_invitation) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'app/mailers/iugu_mailer.rb', line 16

def invitation(user_invitation)
  user = User.find(user_invitation.invited_by)
  set_locale(user)
  @user_invitation = user_invitation
  @account = @user_invitation.
  mail(to: @user_invitation.email, :subject => I18n.t("emails.user_invitation", account_name: @user_invitation..try(:name))) do |format|
    format.html { render "iugu/mailer/invitation" }
  end
  set_default_locale
end

#reset_password_instructions(record, opts = {}) ⇒ Object



10
11
12
13
14
# File 'app/mailers/iugu_mailer.rb', line 10

def reset_password_instructions(record, opts={})
  set_locale(record)
  super(record)
  set_default_locale
end

#template_pathsObject



6
7
8
# File 'app/mailers/iugu_mailer.rb', line 6

def template_paths
  "iugu/mailer"
end

#welcome(user) ⇒ Object



27
28
29
30
31
32
33
34
# File 'app/mailers/iugu_mailer.rb', line 27

def welcome(user)
  set_locale(user)
  @user = user
  mail(to: @user.email, :subject => I18n.t("emails.user_welcome", application_title: IuguSDK::application_title)) do |format|
    format.html { render "iugu/mailer/welcome" }
  end
  set_default_locale
end