I have a new rails 7.0 application. I am trying to load a new turbo stream with no luck. Here is my code. On my index.html page I have the following
<form action="/welcome/remove_stream" method="post" >
<label for="query">Search for:</label>
<input id="query" name="query" type="text" />
<input name="commit" type="submit" value="Remove" data-disable-with="Search" />
</form>
<div id="messages">The messages</div>
Then in the controller I have an empty method
def remove_stream
end
And on the corresponding view. remove_stream.html.erb I have the following.
<turbo-stream action="append" target="messages">
<template>
<div id="message_1">
This div will be appended to the element with the DOM ID "messages".
</div>
</template>
</turbo-stream>
When I submit the form I get the 200 OK but the element is not been appended.