i am using turbo_stream for live data, whenever some change has happened , it should reflect the UI which is opened in another browser without refreshing the page
shared/_table_details.html.erb
<%= turbo_stream_from "badge#{order.id}" %>
<%= turbo_frame_tag "badge#{order.id}" do %>
<span> <%= order.status %> </span>
models/order.rb
broadcasts_to ->(order){"badge#{@order.id}"}
the thing is that, turbo stream is listening to all the badges(status), I can see in the terminal
but when I try to change the badge(status)
and the reason for this is that when i look into the terminal, it says
in the model file, it is not recognizing the id of its own table, so how can i fix this?? maybe i am doing it all wrong
conclusion: i am trying to change the badges(status) via turbo_stream so that if i open this same page in another browser, it should replace the labels which have been affected in the first browser