forked from fixin.me/fixin.me
Don't render index on Unit actions
This commit is contained in:
3
app/views/units/destroy.turbo_stream.erb
Normal file
3
app/views/units/destroy.turbo_stream.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<%= turbo_stream.replace @unit.base unless @unit.base.nil? %>
|
||||
<%= turbo_stream.remove @unit %>
|
||||
<%= turbo_stream.append(:units, render_no_items) if current_user.units.empty? %>
|
||||
@@ -1 +1,4 @@
|
||||
<% render_errors @unit %>
|
||||
<%= turbo_stream.remove @unit %>
|
||||
<%= turbo_stream.replace @previous_base unless @previous_base.nil? %>
|
||||
<%= turbo_stream.replace @unit.base unless @unit.base.nil? || @previous_base == @unit.base %>
|
||||
<%= @before.nil? ? turbo_stream.append(:units, @unit) : turbo_stream.before(@before, @unit) %>
|
||||
|
||||
3
app/views/units/update.turbo_stream.erb
Normal file
3
app/views/units/update.turbo_stream.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<%= turbo_stream.close_form dom_id(@unit, :edit) %>
|
||||
<%= turbo_stream.replace @unit.base unless @unit.base.nil? %>
|
||||
<%= turbo_stream.replace @unit %>
|
||||
Reference in New Issue
Block a user