I am trying to implement Action Cable
. I have previously worked with it though only the basics. I am now working on a project where the admin and the client section are two different projects. The database for both is same of-course.
What i want is that as soon as the User
(from the Client-Side Project
) texts the admin, it should (text) be displayed to the Admin
(In the Admin side Project
) in real time, i.e without refreshing the page.
How to use ActionCable as API gave me ideas but i'm not sure as how i should move forward with it.
Another idea that i had was to implement action cable
in the Admin
Project and call it in a action
of a controller
. Now when the text is created in the client
project, i'll call this action (in the controller of admin project; how i have not yet figured out and yet working on it). This way the Action Cable
will reflect changes in the Admin
.
I don't know if this approach is correct or there's another way.
I'll be grateful for any guidance. Thanks.
P.S: Let me know if this confusing and messy. I'll give it another try.