Merge pull request #1021 from sgmap/simplify

Simplify code in NewGestionnaire::DossiersController
This commit is contained in:
gregoirenovel 2017-11-30 17:29:28 +01:00 committed by GitHub
commit 61b1bccbca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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