controller

This commit is contained in:
Kara Diaby 2024-02-13 07:09:58 +00:00
parent 981e7ff244
commit b69d8249c5
3 changed files with 4 additions and 3 deletions

View file

@ -234,7 +234,7 @@ module Experts
end end
def commentaire_params def commentaire_params
params.require(:commentaire).permit(:body, :piece_jointe) params.require(:commentaire).permit(:body, piece_jointe: [])
end end
end end
end end

View file

@ -256,6 +256,7 @@ module Instructeurs
flash.notice = "Message envoyé" flash.notice = "Message envoyé"
redirect_to messagerie_instructeur_dossier_path(procedure, dossier) redirect_to messagerie_instructeur_dossier_path(procedure, dossier)
else else
@commentaire.piece_jointe.purge.reload
flash.alert = @commentaire.errors.full_messages flash.alert = @commentaire.errors.full_messages
render :messagerie render :messagerie
end end
@ -393,7 +394,7 @@ module Instructeurs
end end
def commentaire_params def commentaire_params
params.require(:commentaire).permit(:body, :piece_jointe) params.require(:commentaire).permit(:body, piece_jointe: [])
end end
def champs_private_params def champs_private_params

View file

@ -621,7 +621,7 @@ module Users
end end
def commentaire_params def commentaire_params
params.require(:commentaire).permit(:body, :piece_jointe) params.require(:commentaire).permit(:body, piece_jointe: [])
end end
end end
end end