From b19d41595df325fba1af6d7d156975bfef8ab252 Mon Sep 17 00:00:00 2001 From: Miro Palka Date: Fri, 31 Jan 2025 16:58:20 +0000 Subject: [PATCH] PSD-3910 - Fix remove_upload action to stay on add_supporting_images page --- app/controllers/notifications/edit_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/notifications/edit_controller.rb b/app/controllers/notifications/edit_controller.rb index 3b80d86dd8..a9c629c457 100644 --- a/app/controllers/notifications/edit_controller.rb +++ b/app/controllers/notifications/edit_controller.rb @@ -332,8 +332,10 @@ def remove_upload @notification.image_upload_ids.delete(upload.id) @notification.save! upload.destroy! + flash[:success] = "Supporting image removed successfully" end - redirect_to notification_edit_path(@notification, step) + @image_upload = ImageUpload.new(upload_model: @notification) + redirect_to notification_edit_path(@notification, :add_supporting_images) end private