I created a simple private messaging app through rails, but I am trying to get it to simply show that new message has arrived without the person having to refresh the page.
I am looking at State Machine because I am thinking that it might be a part of building something like this. Can anyone push me in the right direction?
Thanks.
The simplest way to do that using javascript is to periodically send requests to the server using
setTimeout+$.get().Another a little bit more complicated way is to use gems like faye . There is nice railscast on this theme.