Class: Effective::MembershipsMailer

Inherits:
Object
  • Object
show all
Includes:
EffectiveEmailTemplatesMailer, EffectiveMailer
Defined in:
app/mailers/effective/memberships_mailer.rb

Instance Method Summary collapse

Instance Method Details

#applicant_approved(resource, opts = {}) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'app/mailers/effective/memberships_mailer.rb', line 37

def applicant_approved(resource, opts = {})
  @assigns = assigns_for(resource)
  @applicant = resource

  subject = subject_for(__method__, "Applicant Approved - #{resource}", resource, opts)
  headers = headers_for(resource, opts)

  mail(to: resource.user.email, subject: subject, **headers)
end

#applicant_completed(resource, opts = {}) ⇒ Object



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

def applicant_completed(resource, opts = {})
  @assigns = assigns_for(resource)
  @applicant = resource

  subject = subject_for(__method__, "Applicant Completed - #{resource}", resource, opts)
  headers = headers_for(resource, opts)

  mail(to: resource.user.email, subject: subject, **headers)
end

#applicant_declined(resource, opts = {}) ⇒ Object



47
48
49
50
51
52
53
54
55
# File 'app/mailers/effective/memberships_mailer.rb', line 47

def applicant_declined(resource, opts = {})
  @assigns = assigns_for(resource)
  @applicant = resource

  subject = subject_for(__method__, "Applicant Declined - #{resource}", resource, opts)
  headers = headers_for(resource, opts)

  mail(to: resource.user.email, subject: subject, **headers)
end

#applicant_endorsement_notification(resource, opts = {}) ⇒ Object



57
58
59
60
61
62
63
64
65
# File 'app/mailers/effective/memberships_mailer.rb', line 57

def applicant_endorsement_notification(resource, opts = {})
  @assigns = assigns_for(resource)
  @applicant_endorsement = resource

  subject = subject_for(__method__, 'Endorsement Requested', resource, opts)
  headers = headers_for(resource, opts)

  mail(to: resource.email, subject: subject, **headers)
end

#applicant_missing_info(resource, opts = {}) ⇒ Object



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

def applicant_missing_info(resource, opts = {})
  @assigns = assigns_for(resource)
  @applicant = resource

  subject = subject_for(__method__, "Applicant Missing Info - #{resource}", resource, opts)
  headers = headers_for(resource, opts)

  mail(to: resource.user.email, subject: subject, **headers)
end

#applicant_reference_notification(resource, opts = {}) ⇒ Object



67
68
69
70
71
72
73
74
75
# File 'app/mailers/effective/memberships_mailer.rb', line 67

def applicant_reference_notification(resource, opts = {})
  @assigns = assigns_for(resource)
  @applicant_reference = resource

  subject = subject_for(__method__, 'Reference Requested', resource, opts)
  headers = headers_for(resource, opts)

  mail(to: resource.email, subject: subject, **headers)
end

#applicant_review_submitted(resource, opts = {}) ⇒ Object



77
78
79
80
81
82
83
84
85
86
# File 'app/mailers/effective/memberships_mailer.rb', line 77

def (resource, opts = {})
  @assigns = assigns_for(resource)
  @applicant_review = resource
  @applicant = resource.applicant

  subject = subject_for(__method__, "Applicant Review Submitted - #{resource.applicant}", resource, opts)
  headers = headers_for(resource, opts)

  mail(to: mailer_admin, subject: subject, **headers)
end

#applicant_submitted(resource, opts = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'app/mailers/effective/memberships_mailer.rb', line 7

def (resource, opts = {})
  @assigns = assigns_for(resource)
  @applicant = resource

  subject = subject_for(__method__, "Applicant Submitted - #{resource}", resource, opts)
  headers = headers_for(resource, opts)

  mail(to: resource.user.email, subject: subject, **headers)
end