I'm getting started with Hotwire and Turbo in Rails 6 and have an issue with Turbo not replacing my turbo-frame. I'm receiving the following error message: Response has no matching <turbo-frame id="experiments"> element
.
I have the following being rendered on the page from a controller action:
<!-- index.html.erb -->
<turbo-frame id="experiments" src="/labs/experiments">
<p>This message will be replaced by the response from /labs/experiments.</p>
</turbo-frame>
This correctly sends the request to /labs/experiments
, and when I check my network requests the following is returned from my controller:
<h2>Experiment 1</h2>
<h2>Experiment 2</h2>
However, the response is not rendered inside my turbo-frame and instead I receive a console log warning: Response has no matching <turbo-frame id="experiments"> element
.
Any help is appreciated :)