Merge pull request #521 from sgmap/that_should_not_happen
Admin: remove useless data in admin creation mail
This commit is contained in:
commit
b664928673
3 changed files with 2 additions and 4 deletions
|
@ -18,7 +18,7 @@ class AdministrationsController < ApplicationController
|
||||||
|
|
||||||
if admin.save
|
if admin.save
|
||||||
flash.notice = "Administrateur créé"
|
flash.notice = "Administrateur créé"
|
||||||
NewAdminMailer.new_admin_email(admin, params[:administrateur][:password]).deliver_now!
|
NewAdminMailer.new_admin_email(admin).deliver_now!
|
||||||
else
|
else
|
||||||
flash.alert = admin.errors.full_messages.join('<br>').html_safe
|
flash.alert = admin.errors.full_messages.join('<br>').html_safe
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
class NewAdminMailer < ApplicationMailer
|
class NewAdminMailer < ApplicationMailer
|
||||||
def new_admin_email admin, password
|
def new_admin_email admin
|
||||||
@admin = admin
|
@admin = admin
|
||||||
@password = password
|
|
||||||
|
|
||||||
mail(to: 'tech@tps.apientreprise.fr',
|
mail(to: 'tech@tps.apientreprise.fr',
|
||||||
subject: "Création d'un compte Admin TPS")
|
subject: "Création d'un compte Admin TPS")
|
||||||
|
|
|
@ -3,7 +3,6 @@ Un nouvel administrateur a été créé sur TPS.
|
||||||
Plateforme : <%= TPS::Application::URL %>
|
Plateforme : <%= TPS::Application::URL %>
|
||||||
|
|
||||||
Login : <%= @admin.email %>
|
Login : <%= @admin.email %>
|
||||||
Password : <%= @password %>
|
|
||||||
|
|
||||||
Bonne journée,
|
Bonne journée,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue