Action Cable: How to deliver missed chat messages
问题 What's a good way to deliver missed messages in a chat for instance with Action Cable? Like when you close the laptop and open it again, you are not reloading the page but you may have missed messages One way would be to do an AJAX call instead using Action Cable but then i would have to duplicate some of the logic that happens when you receive a message. I would like to just reuse Action Cable if possible 回答1: Store them in the database of course. And load them from the database each time