I am working on notifications for my rails application. There is a user model and controller, and the Like model associated with the user with the user has many Likes associations.
The idea is that if a user likes another user's profile, the owner of the profile will receive a live notification.
This is my application for understanding ActionCable. I learned the api cable , pub-sub was new to me. I was able to successfully communicate through one channel, and also successfully used authorization . But, nevertheless, I do not understand how to use one channel for each user (dynamically created channel) so that the message sent to one user does not go to another user.
Is it possible to use a dynamic channel?
Or are there other ways when one channel meets all the needs of users.
source
share