forked from fixin.me/fixin.me
Change 'Add unit' link to turbo_stream
This commit is contained in:
8
app/views/units/new.turbo_stream.erb
Normal file
8
app/views/units/new.turbo_stream.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<%= turbo_stream.update @unit do %>
|
||||
<%= render partial: 'form', locals: {unit: @unit} %>
|
||||
<% end %>
|
||||
|
||||
<%= turbo_stream.update :unit_form_frame do %>
|
||||
<%= form_with model: @unit, html: {id: :unit_form} do %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user