Avoid refreshing whole index on create

This commit is contained in:
2024-12-19 03:46:29 +01:00
parent 55b6ff3248
commit e5cf3dc0ae
3 changed files with 8 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
<%= turbo_stream.close_form dom_id(Unit.new) %>
<%= turbo_stream.remove :no_items %>
<%= turbo_stream.replace @unit.base unless @unit.base.nil? %>
<%= @before.nil? ? turbo_stream.append(:units, @unit) : turbo_stream.before(@before, @unit) %>