Trying (and failing) to use page refreshes with morphing in Turbo 8

My goal is to have a post feed that will be automatically updated for all users. So, that’s what I try so far:

Added this in my layout:

<%= turbo_refreshes_with method: :morph, scroll: :preserve %>

<%= yield :head %>

Added the brodcasts_refreshes in the model that I want to brodacast updates:

class Post < ApplicationRecord  

Then, in my index, I tried two ways: Broadcasting each post:

# index.html.erb
    <div id="posts">
      <%= render @posts  %>
# _post.html.erb
<%= turbo_stream_from post %>

<div id="post_<%= %>" class="bg-white shadow rounded-lg p-6 mb-4">

Or broadcasting all posts without broadcasting each post:

# index.html.erb
    <%= turbo_stream_from @posts  %>
    <div id="posts">
      <%= render  %>

Additional info: I’m using Sqlite with Litecable. In the logs I can see this when I CRUD a post: [ActiveJob] Enqueued Turbo::Streams::BroadcastStreamJob (Job ID: d38e47a7-d593-49bc-8c1d-2a0b8d5fda89) to Async(default) with arguments: "posts", {:content=>"<turbo-stream request-id=\"0b3ad242-1693-4bec-90a7-64856dc10cc0\" action=\"refresh\"></turbo-stream>"}

What is wrong with my approach?

What exactly is happening? You didn’t specify but I’m guessing that you’re simply not seeing any updates come through.

You say that you’re seeing the job be “Enqueued”. Looking at the logs, are you also seeing the broadcast job be executed?