Need to replace the entire block, not just the buttons in most cases

Fixes that closure notice was missing from views
This commit is contained in:
Jason Zimdars
2025-11-28 08:22:43 -06:00
parent 91929d7c09
commit d4e540d633
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -2,8 +2,8 @@
<div data-turbo-permanent>
<%= turbo_frame_tag card, :edit do %>
<%# When canceling an edit (with the ESC key), restore the button area to show "Edit" instead of "Save changes". %>
<%= turbo_stream.update dom_id(card, :card_closure_toggle) do %>
<%= render "cards/container/closure_buttons", card: card %>
<%= turbo_stream.replace dom_id(card, :card_closure_toggle) do %>
<%= render "cards/container/closure", card: card %>
<% end %>
<%= render "cards/container/content_display", card: card %>
+1 -1
View File
@@ -1,5 +1,5 @@
<%= turbo_frame_tag @card, :edit do %>
<%# When entering edit mode, this turbo-stream replaces the button area to show
<%# When entering edit mode, this turbo-stream updates the button area to show
"Save changes" instead of "Edit". Turbo processes this stream as part of the
frame response. %>
<%= turbo_stream.update dom_id(@card, :card_closure_toggle) do %>
+2 -2
View File
@@ -4,6 +4,6 @@
<%= render "cards/container/content_display", card: @card %>
<% end %>
<%= turbo_stream.update dom_id(@card, :card_closure_toggle) do %>
<%= render "cards/container/closure_buttons", card: @card %>
<%= turbo_stream.replace dom_id(@card, :card_closure_toggle) do %>
<%= render "cards/container/closure", card: @card %>
<% end %>