Remove a useless method

This commit is contained in:
gregoirenovel 2018-05-31 15:56:57 +02:00
parent 8782bdd961
commit 464d1c1efa
2 changed files with 7 additions and 14 deletions

View file

@ -12,17 +12,19 @@ class GestionnaireMailer < ApplicationMailer
end
def user_to_gestionnaire(email)
@email = email
subject = "Vous avez été nommé accompagnateur"
send_mail(email, nil, subject)
mail(to: @email, subject: subject)
end
def last_week_overview(gestionnaire)
email = gestionnaire.email
@overview = gestionnaire.last_week_overview
headers['X-mailjet-campaign'] = 'last_week_overview'
overview = gestionnaire.last_week_overview
subject = 'Votre activité hebdomadaire'
send_mail(gestionnaire.email, overview, subject)
mail(to: email, subject: subject)
end
def send_dossier(sender, dossier, recipient)
@ -32,13 +34,4 @@ class GestionnaireMailer < ApplicationMailer
mail(to: recipient.email, subject: subject)
end
private
def send_mail(email, args, subject)
@args = args
@email = email
mail(to: email, subject: subject)
end
end

View file

@ -1,6 +1,6 @@
- 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;' }
#{procedure_overview.procedure.libelle}
@ -42,5 +42,5 @@
- end.join(', ')
= 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;' }