Skip to content

Commit a9b16a9

Browse files
authored
Fix tag deletion flow + footer on Tag show page (#424)
2 parents 836a96b + 8aafedf commit a9b16a9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

app/views/tags/destroy.turbo_stream.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<%= turbo_stream.update "delete_tag_#{@tag.id}" do %>
2-
<div class="confirmation-dialog">
2+
<div class="confirmation-dialog mt-4">
33
<h5>Are you sure you want to delete this tag?</h5>
44

55
<div class="mt-4 hstack gap-3">
66
<div>
77
<%= button_to "Confirm Delete", tag_path(@tag, confirmed: true), method: :delete, class: "btn btn-danger" %>
88
</div>
99
<div>
10-
<%= link_to "Cancel", tags_path, class: "btn btn-secondary" %>
10+
<%= link_to "Cancel", tag_path(@tag), class: "btn btn-secondary" %>
1111
</div>
1212
</div>
1313
</div>

app/views/tags/show.html.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
<%= render @tag %>
44

5-
<div id="<%= "delete_tag_#{@tag.id}" %>">
6-
<%= link_to "Back to tags", tags_path, class: "mt-4" %>
5+
<%= link_to "Back to tags", tags_path, class: "mt-4" %>
76

87
<div>
98
<%= link_to "Edit this tag", edit_tag_path(@tag), class: "btn btn-primary mt-4" %>
109
</div>
1110

12-
<div>
11+
<div id="<%= "delete_tag_#{@tag.id}" %>">
1312
<%= button_to "Delete this tag", @tag, method: :delete, class: "btn btn-danger mt-4" %>
1413
</div>

0 commit comments

Comments
 (0)