I am trying to create a chat app and would like the messages to be styled differently depending on who’s chatroom is being viewed.
In order to do that I need my
_message.html.erb partial to be able to see what chat room is being viewed so I have a
hidden_field_tag :room_id, room.id in my new message form.
The problem is that I’m having trouble finding a way to pass the
room_id as a local variable to my _message
partial because I can't pass the params to themessage.rb` model.
I’m wondering if there is a way to call the turbo stream broadcast from the controller action so I can pass the the