Move thread to its own partial
This commit is contained in:
@@ -3,5 +3,5 @@
|
||||
<% end %>
|
||||
|
||||
<%= turbo_stream.replace dom_id(@bubble, :thread) do %>
|
||||
<%= render @bubble.thread %>
|
||||
<%= render "bubbles/thread", bubble: @bubble %>
|
||||
<% end %>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<section id="<%= dom_id(bubble, :thread) %>" class="comments align-center center borderless margin flex flex-column gap-half" style="--bubble-color: <%= bubble.color %>;">
|
||||
<%= render partial: "thread_entries/thread_entry", collection: bubble.thread.entries, cache: true %>
|
||||
<%= render "comments/new", bubble: bubble %>
|
||||
</section>
|
||||
@@ -19,8 +19,5 @@
|
||||
<%= render "bubbles/bubble", bubble: @bubble %>
|
||||
</div>
|
||||
|
||||
<section id="<%= dom_id(@bubble, :thread) %>" class="comments align-center center borderless margin flex flex-column gap-half" style="--bubble-color: <%= @bubble.color %>;">
|
||||
<%= render partial: "thread_entries/thread_entry", collection: @bubble.thread.entries, cache: true %>
|
||||
<%= render "comments/new", bubble: @bubble %>
|
||||
</section>
|
||||
<%= render "bubbles/thread", bubble: @bubble %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user