Remove useless methods
This commit is contained in:
parent
b364b8bfb3
commit
69e95f62c8
2 changed files with 5 additions and 12 deletions
|
@ -35,13 +35,9 @@ class GestionnaireMailer < ApplicationMailer
|
|||
|
||||
private
|
||||
|
||||
def vars_mailer(email, args)
|
||||
def send_mail(email, args, subject)
|
||||
@args = args
|
||||
@email = email
|
||||
end
|
||||
|
||||
def send_mail(email, args, subject)
|
||||
vars_mailer email, args
|
||||
|
||||
mail(to: email, subject: subject)
|
||||
end
|
||||
|
|
|
@ -1,25 +1,22 @@
|
|||
class InviteMailer < ApplicationMailer
|
||||
def invite_user(invite)
|
||||
vars_mailer(invite)
|
||||
subject = "Participez à l'élaboration d'un dossier"
|
||||
|
||||
send_mail(invite.email, subject, invite.email_sender) if invite.user.present?
|
||||
send_mail(invite, subject, invite.email_sender) if invite.user.present?
|
||||
end
|
||||
|
||||
def invite_guest(invite)
|
||||
vars_mailer(invite)
|
||||
subject = "#{invite.email_sender} vous invite à consulter un dossier"
|
||||
|
||||
send_mail(invite.email, subject, invite.email_sender)
|
||||
send_mail(invite, subject, invite.email_sender)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def vars_mailer(invite)
|
||||
def send_mail(invite, subject, reply_to)
|
||||
@invite = invite
|
||||
end
|
||||
email = invite.email
|
||||
|
||||
def send_mail(email, subject, reply_to)
|
||||
mail(to: email,
|
||||
subject: subject,
|
||||
reply_to: reply_to)
|
||||
|
|
Loading…
Reference in a new issue