Module: MuckUsers::Mailers::MuckUserMailer

Extended by:
ActiveSupport::Concern
Defined in:
lib/muck-users/mailers/user_mailer.rb

Instance Method Summary collapse

Instance Method Details

#access_code(email, subject, message, code) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/muck-users/mailers/user_mailer.rb', line 57

def access_code(email, subject, message, code)
  @message = message
  @code = code
  @code_included = @message.include?('{code}')
  @signup_link_included = @message.include?('{signup_link}')
  @message.gsub!('{code}', @code)
  mail(:to => email, :subject => subject) do |format|
    format.html
    format.text
  end
end

#access_code_request_confirm(email) ⇒ Object



69
70
71
72
73
74
# File 'lib/muck-users/mailers/user_mailer.rb', line 69

def access_code_request_confirm(email)
  mail(:to => email, :subject => I18n.t('muck.users.access_code_request_confirm_subject', :application_name => MuckEngine.configuration.application_name)) do |format|
    format.html
    format.text
  end
end

#activation_confirmation(user) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/muck-users/mailers/user_mailer.rb', line 8

def activation_confirmation(user)
  @user = user
  mail(:to => user.email, :subject => I18n.t('muck.users.activation_complete')) do |format|
    format.html
    format.text
  end
end

#activation_instructions(user) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/muck-users/mailers/user_mailer.rb', line 16

def activation_instructions(user)
  @user = user
  @account_activation_url = activate_url(user.perishable_token)
  mail(:to => user.email, :subject => I18n.t('muck.users.activation_instructions')) do |format|
    format.html
    format.text
  end
end

#password_not_active_instructions(user) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/muck-users/mailers/user_mailer.rb', line 25

def password_not_active_instructions(user)
  @user = user
  mail(:to => user.email, :subject => I18n.t('muck.users.account_not_activated', :application_name => MuckEngine.configuration.application_name)) do |format|
    format.html
    format.text
  end
end

#password_reset_instructions(user) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/muck-users/mailers/user_mailer.rb', line 33

def password_reset_instructions(user)
  @user = user
  mail(:to => user.email, :subject => I18n.t('muck.users.password_reset_email_subject', :application_name => MuckEngine.configuration.application_name)) do |format|
    format.html
    format.text
  end
end

#username_request(user) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/muck-users/mailers/user_mailer.rb', line 49

def username_request(user)
  @user = user
  mail(:to => user.email, :subject => I18n.t('muck.users.request_username_subject', :application_name => MuckEngine.configuration.application_name)) do |format|
    format.html
    format.text
  end
end

#welcome_notification(user) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/muck-users/mailers/user_mailer.rb', line 41

def welcome_notification(user)
  @user = user
  mail(:to => user.email, :subject => I18n.t('muck.users.welcome_email_subject', :application_name => MuckEngine.configuration.application_name)) do |format|
    format.html
    format.text
  end
end