forked from fixin.me/fixin.me
Add Quantity #reparent action
This commit is contained in:
9
app/views/quantities/reparent.turbo_stream.erb
Normal file
9
app/views/quantities/reparent.turbo_stream.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<% @self_and_progenies.each do |q| %>
|
||||
<%= turbo_stream.remove q %>
|
||||
<% end %>
|
||||
<% @previous_ancestors.union(@ancestors).map do |ancestor| %>
|
||||
<%= turbo_stream.replace ancestor %>
|
||||
<% end %>
|
||||
<% @self_and_progenies.each do |q| %>
|
||||
<%= @before.nil? ? turbo_stream.append(:quantities, q) : turbo_stream.before(@before, q) %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user