[fix #1897] Procedure: can delete a deliberation

This commit is contained in:
simon lehericey 2018-05-31 11:15:44 +02:00
parent 0e690c90cc
commit 18ad227df5
4 changed files with 24 additions and 0 deletions

View file

@ -217,6 +217,15 @@ class Admin::ProceduresController < AdminController
render json: json_path_list
end
def delete_deliberation
procedure = Procedure.find(params[:id])
procedure.deliberation.purge_later
flash.notice = 'la délibération a bien été supprimée'
redirect_to edit_admin_procedure_path(procedure)
end
private
def cloned_from_library?