refactor(instructeur): use better fallback location

This commit is contained in:
Paul Chavard 2022-03-11 13:55:36 +01:00
parent bc4ff661ad
commit 78bf1147d0
2 changed files with 8 additions and 8 deletions

View file

@ -96,24 +96,24 @@ module Instructeurs
def follow
current_instructeur.follow(dossier)
flash.notice = 'Dossier suivi'
redirect_back(fallback_location: instructeur_procedures_url)
redirect_back(fallback_location: instructeur_procedure_path(procedure))
end
def unfollow
current_instructeur.unfollow(dossier)
flash.notice = "Vous ne suivez plus le dossier nº #{dossier.id}"
redirect_back(fallback_location: instructeur_procedures_url)
redirect_back(fallback_location: instructeur_procedure_path(procedure))
end
def archive
dossier.archiver!(current_instructeur)
redirect_back(fallback_location: instructeur_procedures_url)
redirect_back(fallback_location: instructeur_procedure_path(procedure))
end
def unarchive
dossier.desarchiver!(current_instructeur)
redirect_back(fallback_location: instructeur_procedures_url)
redirect_back(fallback_location: instructeur_procedure_path(procedure))
end
def passer_en_instruction