Class: Effective::CpdMailer

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

Instance Method Summary collapse

Instance Method Details

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



152
153
154
155
156
157
158
159
160
161
162
# File 'app/mailers/effective/cpd_mailer.rb', line 152

def cpd_audit_closed(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Closed', resource, opts)
  headers = headers_for(resource, opts)

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

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



32
33
34
35
36
37
38
39
40
41
42
# File 'app/mailers/effective/cpd_mailer.rb', line 32

def cpd_audit_conflict_resolved(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Conflict Resolved', resource, opts)
  headers = headers_for(resource, opts)

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

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



20
21
22
23
24
25
26
27
28
29
30
# File 'app/mailers/effective/cpd_mailer.rb', line 20

def cpd_audit_conflicted(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.edit_admin_cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Conflicted', resource, opts)
  headers = headers_for(resource, opts)

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

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



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

def cpd_audit_exemption_denied(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Exemption Denied', resource, opts)
  headers = headers_for(resource, opts)

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

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



68
69
70
71
72
73
74
75
76
77
78
# File 'app/mailers/effective/cpd_mailer.rb', line 68

def cpd_audit_exemption_granted(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Exemption Granted', resource, opts)
  headers = headers_for(resource, opts)

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

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



44
45
46
47
48
49
50
51
52
53
54
# File 'app/mailers/effective/cpd_mailer.rb', line 44

def cpd_audit_exemption_request(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.edit_admin_cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Exemption Request', resource, opts)
  headers = headers_for(resource, opts)

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

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



92
93
94
95
96
97
98
99
100
101
102
# File 'app/mailers/effective/cpd_mailer.rb', line 92

def cpd_audit_extension_denied(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Extension Denied', resource, opts)
  headers = headers_for(resource, opts)

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

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



104
105
106
107
108
109
110
111
112
113
114
# File 'app/mailers/effective/cpd_mailer.rb', line 104

def cpd_audit_extension_granted(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Extension Granted', resource, opts)
  headers = headers_for(resource, opts)

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

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



80
81
82
83
84
85
86
87
88
89
90
# File 'app/mailers/effective/cpd_mailer.rb', line 80

def cpd_audit_extension_request(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.edit_admin_cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Extension Request', resource, opts)
  headers = headers_for(resource, opts)

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

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



128
129
130
131
132
133
134
135
136
137
138
# File 'app/mailers/effective/cpd_mailer.rb', line 128

def cpd_audit_missing_info(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Missing Info', resource, opts)
  headers = headers_for(resource, opts)

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

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

CPD Audit



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

def cpd_audit_opened(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Opened', resource, opts)
  headers = headers_for(resource, opts)

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

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

CPD Audit Review



165
166
167
168
169
170
171
172
173
174
175
# File 'app/mailers/effective/cpd_mailer.rb', line 165

def cpd_audit_review_opened(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAuditReview') unless resource.kind_of?(EffectiveCpd.CpdAuditReview)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_review_url(resource))
  @cpd_audit_review = resource

  subject = subject_for(__method__, 'CPD Audit Review Opened', resource, opts)
  headers = headers_for(resource, opts)

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

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



177
178
179
180
181
182
183
184
185
186
187
# File 'app/mailers/effective/cpd_mailer.rb', line 177

def cpd_audit_review_ready(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAuditReview') unless resource.kind_of?(EffectiveCpd.CpdAuditReview)

  @assigns = assigns_for(resource).merge(url: effective_cpd.cpd_audit_review_url(resource))
  @cpd_audit_review = resource

  subject = subject_for(__method__, 'CPD Audit Review Ready', resource, opts)
  headers = headers_for(resource, opts)

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

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



189
190
191
192
193
194
195
196
197
198
199
# File 'app/mailers/effective/cpd_mailer.rb', line 189

def (resource, opts = {})
  raise('expected an EffectiveCpd.CpdAuditReview') unless resource.kind_of?(EffectiveCpd.CpdAuditReview)

  @assigns = assigns_for(resource).merge(url: effective_cpd.edit_admin_cpd_audit_url(resource.cpd_audit))
  @cpd_audit_review = resource

  subject = subject_for(__method__, 'CPD Audit Review Submitted', resource, opts)
  headers = headers_for(resource, opts)

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

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



140
141
142
143
144
145
146
147
148
149
150
# File 'app/mailers/effective/cpd_mailer.rb', line 140

def cpd_audit_reviewed(resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.edit_admin_cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Reviewed', resource, opts)
  headers = headers_for(resource, opts)

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

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



116
117
118
119
120
121
122
123
124
125
126
# File 'app/mailers/effective/cpd_mailer.rb', line 116

def (resource, opts = {})
  raise('expected an EffectiveCpd.CpdAudit') unless resource.kind_of?(EffectiveCpd.CpdAudit)

  @assigns = assigns_for(resource).merge(url: effective_cpd.edit_admin_cpd_audit_url(resource))
  @cpd_audit = resource

  subject = subject_for(__method__, 'CPD Audit Submitted', resource, opts)
  headers = headers_for(resource, opts)

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