forked from fixin.me/fixin.me
* adding streams in client breaks things (e.g. autofocus) * some tasks need to be performed in one stream action to avoid flickering (e.g. table row substitution)
10 lines
317 B
Plaintext
10 lines
317 B
Plaintext
<% link_id = dom_id(@unit.base || @unit, :add) %>
|
|
<%= turbo_stream.disable link_id -%>
|
|
|
|
<%= turbo_stream.update :unit_form_frame do %>
|
|
<%= form_with model: @unit, html: {id: :unit_form} do %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= turbo_stream.insert_form (@unit.base || :units), partial: 'form', locals: {link_id: link_id} %>
|