Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

Can you use Actioncable for multiple things in your project?

Rails • Asked by Masud Hossain

I want to use actioncable to pull notifications AND also use it for user to user chatting. Is this possible and pain free to do?

I guess what i'm asking is, can i join these two videos together into one project without doing anything special:

https://gorails.com/episodes/realtime-notifications-with-actioncable?autoplay=1
https://gorails.com/episodes/direct-messages-in-realtime-with-actioncable?autoplay=1


Hey Masud,

Absolutely. The way it's designed is that you can create a new channel for each feature you want and the ActionCable code internally will automatically separate out the messages for each of those channels. That means you can have one for notifications and one for chat and they will be separated out between those channels.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 29,763+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.