fix procedure not found

This commit is contained in:
kara Diaby 2021-06-08 17:55:38 +02:00
parent c6b6ba96b1
commit b3c5fcb4c5

View file

@ -17,5 +17,15 @@ module Users
def procedure def procedure
Procedure.publiees.or(Procedure.brouillons).find_by(path: params[:path]) Procedure.publiees.or(Procedure.brouillons).find_by(path: params[:path])
end end
def procedure_not_found
if procedure&.close?
flash.alert = t('errors.messages.procedure_archived')
else
flash.alert = t('errors.messages.procedure_not_found')
end
redirect_to root_path
end
end end
end end