Remove a useless method
This commit is contained in:
parent
8782bdd961
commit
464d1c1efa
2 changed files with 7 additions and 14 deletions
|
@ -12,17 +12,19 @@ class GestionnaireMailer < ApplicationMailer
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_to_gestionnaire(email)
|
def user_to_gestionnaire(email)
|
||||||
|
@email = email
|
||||||
subject = "Vous avez été nommé accompagnateur"
|
subject = "Vous avez été nommé accompagnateur"
|
||||||
|
|
||||||
send_mail(email, nil, subject)
|
mail(to: @email, subject: subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
def last_week_overview(gestionnaire)
|
def last_week_overview(gestionnaire)
|
||||||
|
email = gestionnaire.email
|
||||||
|
@overview = gestionnaire.last_week_overview
|
||||||
headers['X-mailjet-campaign'] = 'last_week_overview'
|
headers['X-mailjet-campaign'] = 'last_week_overview'
|
||||||
overview = gestionnaire.last_week_overview
|
|
||||||
subject = 'Votre activité hebdomadaire'
|
subject = 'Votre activité hebdomadaire'
|
||||||
|
|
||||||
send_mail(gestionnaire.email, overview, subject)
|
mail(to: email, subject: subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_dossier(sender, dossier, recipient)
|
def send_dossier(sender, dossier, recipient)
|
||||||
|
@ -32,13 +34,4 @@ class GestionnaireMailer < ApplicationMailer
|
||||||
|
|
||||||
mail(to: recipient.email, subject: subject)
|
mail(to: recipient.email, subject: subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def send_mail(email, args, subject)
|
|
||||||
@args = args
|
|
||||||
@email = email
|
|
||||||
|
|
||||||
mail(to: email, subject: subject)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
- content_for(:title, 'Votre activité hebdomadaire')
|
- content_for(:title, 'Votre activité hebdomadaire')
|
||||||
|
|
||||||
- @args[:procedure_overviews].each_with_index do |procedure_overview, index|
|
- @overview[:procedure_overviews].each_with_index do |procedure_overview, index|
|
||||||
|
|
||||||
%h2{ style: 'font-size: 20px; font-weight: 300; margin: 25px 0 5px;' }
|
%h2{ style: 'font-size: 20px; font-weight: 300; margin: 25px 0 5px;' }
|
||||||
#{procedure_overview.procedure.libelle}
|
#{procedure_overview.procedure.libelle}
|
||||||
|
@ -42,5 +42,5 @@
|
||||||
- end.join(', ')
|
- end.join(', ')
|
||||||
= sanitize(old_dossiers_en_instruction, attributes: %w(href style))
|
= sanitize(old_dossiers_en_instruction, attributes: %w(href style))
|
||||||
|
|
||||||
- if index != (@args[:procedure_overviews].count - 1)
|
- if index != (@overview[:procedure_overviews].count - 1)
|
||||||
.spacer{ style: 'border-bottom: 1px solid #CCC; margin: 25px 0 30px;' }
|
.spacer{ style: 'border-bottom: 1px solid #CCC; margin: 25px 0 30px;' }
|
||||||
|
|
Loading…
Reference in a new issue