From 88f3f942f7ccbd1dcc7de8926473151707082ac0 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Mon, 8 Dec 2025 22:57:38 -0600 Subject: [PATCH] Ensure edit (not trash) is displayed Fix conditional --- app/views/accounts/users/_user.html.erb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/views/accounts/users/_user.html.erb b/app/views/accounts/users/_user.html.erb index dfabcef..02233bb 100644 --- a/app/views/accounts/users/_user.html.erb +++ b/app/views/accounts/users/_user.html.erb @@ -20,12 +20,15 @@ <% end %> <% end %> - <%= button_to account_user_path(user), method: :delete, class: "btn txt-small flex-item-no-shrink btn--negative", data: { - turbo_confirm: "Are you sure you want to permanently remove this person from the account? This can’t be undone."} do %> - <%= image_tag "minus.svg", size: 20, aria: { hidden: "true" } %> - Delete <%= user.name %> + <% unless user == Current.user %> + <%= button_to account_user_path(user), method: :delete, class: "btn txt-small flex-item-no-shrink btn--negative", data: { + turbo_confirm: "Are you sure you want to permanently remove this person from the account? This can’t be undone."} do %> + <%= image_tag "minus.svg", size: 20, aria: { hidden: "true" } %> + Delete <%= user.name %> + <% end %> <% end %> - <% elsif user == Current.user %> + <% end %> + <% if user == Current.user %> <%= link_to user_profile_path, class: "btn txt-small flex-item-no-shrink", target: "_top" do %> <%= image_tag "pencil.svg", size: 20, aria: { hidden: "true" } %> My settings