From fb50606680383832af6d744588906e20cceb12d9 Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Fri, 30 Jun 2017 17:21:41 +0200 Subject: [PATCH] Admin: remove useless data in admin creation mail --- app/controllers/administrations_controller.rb | 2 +- app/mailers/new_admin_mailer.rb | 3 +-- app/views/new_admin_mailer/new_admin_email.text.erb | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/administrations_controller.rb b/app/controllers/administrations_controller.rb index 26ebc9087..8a36c6fc5 100644 --- a/app/controllers/administrations_controller.rb +++ b/app/controllers/administrations_controller.rb @@ -18,7 +18,7 @@ class AdministrationsController < ApplicationController if admin.save flash.notice = "Administrateur créé" - NewAdminMailer.new_admin_email(admin, params[:administrateur][:password]).deliver_now! + NewAdminMailer.new_admin_email(admin).deliver_now! else flash.alert = admin.errors.full_messages.join('
').html_safe end diff --git a/app/mailers/new_admin_mailer.rb b/app/mailers/new_admin_mailer.rb index 673b2a53a..71ea69b4f 100644 --- a/app/mailers/new_admin_mailer.rb +++ b/app/mailers/new_admin_mailer.rb @@ -1,7 +1,6 @@ class NewAdminMailer < ApplicationMailer - def new_admin_email admin, password + def new_admin_email admin @admin = admin - @password = password mail(to: 'tech@tps.apientreprise.fr', subject: "Création d'un compte Admin TPS") diff --git a/app/views/new_admin_mailer/new_admin_email.text.erb b/app/views/new_admin_mailer/new_admin_email.text.erb index 678123a26..e0946ef9a 100644 --- a/app/views/new_admin_mailer/new_admin_email.text.erb +++ b/app/views/new_admin_mailer/new_admin_email.text.erb @@ -3,7 +3,6 @@ Un nouvel administrateur a été créé sur TPS. Plateforme : <%= TPS::Application::URL %> Login : <%= @admin.email %> -Password : <%= @password %> Bonne journée,