controller
This commit is contained in:
parent
981e7ff244
commit
b69d8249c5
3 changed files with 4 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue