ValentinKLN

Joined

750 Experience
0 Lessons Completed
1 Question Solved

Activity

Posted in ActionCable streaming from a strange channel name

Oh my god, it's "stream_from" and not "stream_for". SORRY GUYS...

Posted in ActionCable streaming from a strange channel name

Hello!

I'm following your course "Group Chat with ActionCable" and everything works fine, except one thing: 

When I broadcast to 
ActionCable.server.broadcast "rooms:#{message.room.id}"
, it does nothing. The "received" function is never called. 

Something is strange in my app console : 
ActionCable] [User 6] RoomsChannel is streaming from rooms:rooms:1
Why do I have 2 times rooms ? I think that's the problem. But in my RoomsChannel file I'm streaming the right name: 
stream_for "rooms:#{room.id}"

Thanks in advance for your answer!

Best regards, 

Valentin
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.