Skip to content

Commit

Permalink
Change delete buttons to links
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaronixon committed Mar 21, 2023
1 parent dba8a8e commit c6bb594
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<td>
<%= link_to "View", user, class: "btn btn-white btn-sm" %>
<%= link_to "Edit", edit_admin_user_path(user), class: "btn btn-white btn-sm" %>
<%= button_to "Delete", user, method: :delete, "data-confirm": "Are you sure?", form_class: "d-inline", class: "btn btn-white btn-sm" %>
<%= link_to "Delete", user, class: "btn btn-white btn-sm", data: { method: :delete, confirm: "Are you sure?" } %>
</td>
</tr>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<%= render "page_header_actions" do %>
<%= link_to "Edit user", edit_admin_user_path(@user), class: "btn btn-primary" %>
<%= button_to "Delete user", @user, method: :delete, "data-confirm": "Are you sure?", form_class: "d-inline", class: "btn btn-white" %>
<%= link_to "Delete user", @user, class: "btn btn-white", data: { method: :delete, confirm: "Are you sure?" } %>
<% end %>
<% end %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<td>
<%%= link_to "View", <%= model_resource_name %>, class: "btn btn-white btn-sm" %>
<%%= link_to "Edit", <%= edit_helper(singular_table_name, type: :path) %>, class: "btn btn-white btn-sm" %>
<%%= button_to "Delete", <%= model_resource_name %>, method: :delete, "data-confirm": "Are you sure?", form_class: "d-inline", class: "btn btn-white btn-sm" %>
<%%= link_to "Delete", <%= model_resource_name %>, class: "btn btn-white btn-sm", data: { method: :delete, confirm: "Are you sure?" } %>
</td>
</tr>
<%% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<%%= render "page_header_actions" do %>
<%%= link_to "Edit <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "btn btn-primary" %>
<%%= button_to "Delete <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, "data-confirm": "Are you sure?", form_class: "d-inline", class: "btn btn-white" %>
<%%= link_to "Delete <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "btn btn-white", data: { method: :delete, confirm: "Are you sure?" } %>
<%% end %>
<%% end %>

Expand Down

0 comments on commit c6bb594

Please sign in to comment.