I'm trying to insert something after a div using broadcast_append_to and i noticed that what I'm inserting it's appended inside the target div.
Ex:
index.html.erb
:
<%= turbo_stream_from "divs" %>
<div id="append_outside_of_me">
</div>
Broadcast Somewhere:
broadcast_append_to "divs", target: "append_outside_of_me", partial: "tests/test"
app.views.tests._test.html.erb
:
Appended text
Result:
<div id="append_outside_of_me">
<!-- BEGIN app/views/tests/_test.html.erb -->Appended text<!-- END app/views/tests/_test.html.erb -->
</div>
Wanted result:
<div id="append_outside_of_me">
</div>
<!-- BEGIN app/views/tests/_test.html.erb -->Appended text<!-- END app/views/tests/_test.html.erb -->
How can i append it to the target div but outside of it?