Prefer explicit turbo stream templates

This commit is contained in:
David Heinemeier Hansson
2025-11-02 20:22:15 +01:00
parent cf503bfba3
commit 39dc2b6ab9
2 changed files with 2 additions and 5 deletions
@@ -3,11 +3,6 @@ class Collections::EntropiesController < ApplicationController
def update
@collection.entropy.update!(entropy_params)
render turbo_stream: [
turbo_stream.replace([ @collection, :entropy ], partial: "collections/edit/auto_close", locals: { collection: @collection }),
turbo_stream_flash(notice: "Saved")
]
end
private
@@ -0,0 +1,2 @@
<%= turbo_stream.replace([ @collection, :entropy ], partial: "collections/edit/auto_close", locals: { collection: @collection }) %>
<%= turbo_stream_flash(notice: "Saved") %>