Merge pull request #521 from sgmap/that_should_not_happen

Admin: remove useless data in admin creation mail
This commit is contained in:
gregoirenovel 2017-07-03 09:27:59 +02:00 committed by GitHub
commit b664928673
3 changed files with 2 additions and 4 deletions

View file

@ -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('<br>').html_safe
end

View file

@ -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")

View file

@ -3,7 +3,6 @@ Un nouvel administrateur a été créé sur TPS.
Plateforme : <%= TPS::Application::URL %>
Login : <%= @admin.email %>
Password : <%= @password %>
Bonne journée,