fix procedure not found
This commit is contained in:
parent
c6b6ba96b1
commit
b3c5fcb4c5
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue