[#835] Use the create_avis_params method instead of the params hash
This commit is contained in:
parent
82351d608f
commit
19a6391dc8
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue