0

I've got a Rails 6 app using turbo-rails. In my HTML I'm rendering a div like so

<div id="<%= dom_id(@enroll)%>"></div>

When I click a button_to tag I trigger the destroy action that runs a destroy.turbo_stream.erb view file

<%= turbo_stream.remove dom_id(@enroll) %>

When this runs, however, I get this error in the browser console

Error: <turbo-stream action="remove" target="enroll_2423">: first child element must be a <template> element

Judging by the turbo docs remove actions don't need a <template> (of course).

Why is that the case? Could this be a bug with the turbo library?

ilrock
  • 573
  • 8
  • 24

0 Answers0