From edb56c84ef82f389c4259f9dd55f71230bd6eed9 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 22 Jan 2024 15:26:29 -0600 Subject: [PATCH] All edit pages have working delete buttons --- app/views/vendors/edit.html.erb | 1 + app/views/workers/edit.html.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/vendors/edit.html.erb b/app/views/vendors/edit.html.erb index 92ab41a..7b14f40 100644 --- a/app/views/vendors/edit.html.erb +++ b/app/views/vendors/edit.html.erb @@ -8,6 +8,7 @@
<%= link_to 'Cancel', vendor_path(@vendor), class: "btn btn-warning" %> <%= link_to 'Back to List', vendors_path, class: "btn btn-secondary" %> + <%= link_to 'Delete', @vendor, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger" %>
diff --git a/app/views/workers/edit.html.erb b/app/views/workers/edit.html.erb index 6df7e5a..1397f1a 100644 --- a/app/views/workers/edit.html.erb +++ b/app/views/workers/edit.html.erb @@ -8,6 +8,7 @@
<%= link_to 'Cancel', worker_path(@worker), class: "btn btn-warning" %> <%= link_to 'Back to List', workers_path, class: "btn btn-secondary" %> + <%= link_to 'Delete', @worker, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger" %>