Simplify code in NewGestionnaire::DossiersController

We already have procedure: it is given by
ProceduresController, which this controller
inherits form
This commit is contained in:
gregoirenovel 2017-11-30 17:02:38 +01:00
parent 825486ea8e
commit 6c785d71b4

View file

@ -66,7 +66,7 @@ module NewGestionnaire
if @commentaire.save
current_gestionnaire.follow(dossier)
flash.notice = "Message envoyé"
redirect_to messagerie_dossier_path(dossier.procedure, dossier)
redirect_to messagerie_dossier_path(procedure, dossier)
else
flash.alert = @commentaire.errors.full_messages
render :messagerie
@ -91,13 +91,13 @@ module NewGestionnaire
def create_avis
Avis.create(avis_params.merge(claimant: current_gestionnaire, dossier: dossier))
redirect_to avis_dossier_path(dossier.procedure, dossier)
redirect_to avis_dossier_path(procedure, dossier)
end
def update_annotations
dossier = current_gestionnaire.dossiers.includes(champs_private: :type_de_champ).find(params[:dossier_id])
dossier.update_attributes(champs_private_params)
redirect_to annotations_privees_dossier_path(dossier.procedure, dossier)
redirect_to annotations_privees_dossier_path(procedure, dossier)
end
def print