app: move archive to NewAdministrateur::ProceduresController
This commit is contained in:
parent
e7c8a9fff5
commit
a004ac59df
5 changed files with 47 additions and 48 deletions
|
@ -1,13 +1,2 @@
|
|||
class Admin::ProceduresController < AdminController
|
||||
def archive
|
||||
procedure = current_administrateur.procedures.find(params[:procedure_id])
|
||||
procedure.close!
|
||||
|
||||
flash.notice = "Démarche close"
|
||||
redirect_to admin_procedures_path
|
||||
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
flash.alert = 'Démarche inexistante'
|
||||
redirect_to admin_procedures_path
|
||||
end
|
||||
end
|
||||
|
|
|
@ -132,6 +132,18 @@ module NewAdministrateur
|
|||
redirect_to admin_procedures_path
|
||||
end
|
||||
|
||||
def archive
|
||||
procedure = current_administrateur.procedures.find(params[:procedure_id])
|
||||
procedure.close!
|
||||
|
||||
flash.notice = "Démarche close"
|
||||
redirect_to admin_procedures_path
|
||||
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
flash.alert = 'Démarche inexistante'
|
||||
redirect_to admin_procedures_path
|
||||
end
|
||||
|
||||
def destroy
|
||||
procedure = current_administrateur.procedures.find(params[:id])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue