[Fix #721] If an avis is created with uppercase email, downcase it before save

This commit is contained in:
Mathieu Magnin 2017-09-12 17:02:45 +02:00
parent 39a53ff9b9
commit 31995c270c
3 changed files with 30 additions and 1 deletions

View file

@ -7,7 +7,7 @@ class Backoffice::AvisController < ApplicationController
avis = Avis.new(create_params.merge(claimant: current_gestionnaire, dossier: dossier))
if avis.save
flash[:notice] = "Votre demande d'avis a bien été envoyée à #{create_params[:email]}"
flash[:notice] = "Votre demande d'avis a bien été envoyée à #{avis.email}"
end
redirect_to backoffice_dossier_path(dossier)