Users receive messages real time without refresh

Implemented web sockets gem for rails 4. Web sockets has a built in
dispatcher object which connects the client to our server. We can create
channels in our controllers and models and then subscribe to those
channels in our Javascript.