Say my user is viewing messages/index, and someone else sends him a message. I'd like the user's view to update in real-time to reflect the new message, kind of like how Twitter lets me know there are more messages on my timeline. Are there any examples of this being done in Rails?
+1
A:
You can either use AJAX to poll the server for updates on a regular basis (pull model), or use the Juggernaut plugin or similar to enable the server to send updates to the client (push model). Note that this requires Flash to be installed on the client.
John Topley
2010-02-18 18:33:25
A:
DUI.stream from digg might be the solution you are looking for. It keeps an open xhr stream that you can keep on adding objects to to send to the user. It has a ruby client example