From fc080897968f93b2b192cf3b53fdbcffd8640759 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 8 Sep 2024 18:27:47 +0300 Subject: [PATCH] Introduce volunteer deletion --- app/controllers/management/volunteers_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/management/volunteers_controller.rb b/app/controllers/management/volunteers_controller.rb index ae18b36..169cf76 100644 --- a/app/controllers/management/volunteers_controller.rb +++ b/app/controllers/management/volunteers_controller.rb @@ -15,6 +15,12 @@ module Management @volunteer = current_conference.volunteers.find(params[:id]) end + def destroy + @volunteer = current_conference.volunteers.find(params[:id]) + @volunteer.destroy! + redirect_to management_conference_volunteers_path(conference_id: current_conference.id) + end + def update @volunteer = current_conference.volunteers.find(params[:id])