[#835] Use the create_avis_params method instead of the params hash

This commit is contained in:
gregoirenovel 2018-09-11 09:28:13 +02:00 committed by Frederic Merizen
parent 82351d608f
commit 19a6391dc8

View file

@ -60,7 +60,7 @@ module NewGestionnaire
end
def create_avis
confidentiel = avis.confidentiel || params[:avis][:confidentiel]
confidentiel = avis.confidentiel || create_avis_params[:confidentiel]
@new_avis = Avis.new(create_avis_params.merge(claimant: current_gestionnaire, dossier: avis.dossier, confidentiel: confidentiel))
if @new_avis.save
@ -143,7 +143,7 @@ module NewGestionnaire
end
def create_avis_params
params.require(:avis).permit(:email, :introduction)
params.require(:avis).permit(:email, :introduction, :confidentiel)
end
end
end