Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

ActionCable: One channel per user

$
0
0

I am working on notifications for my rails app. There is User model and controller and Like model associated to User with a User has many Likes association.

The idea is, if a user likes the profile of another user, owner of the profile will get a live notification.

This is my app for understanding ActionCable. I studied the cable api, pub-sub was new to me. I was able to make successful communication through a single channel, and also successfully used the authorization. But, still I don't understand how to use single channel per user (dynamically generated channel), so that message posted to one user doesn't go to another user.

Is dynamic channel possible?

Or, are there other ways where a single channel satisfies all the users needs


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>