Thursday, June 16, 2016

Create a Chat App with Rails 5, ActionCable, and Devise

Rails 5 has introduced a bunch of new great features, but one of the most anticipated ones is of course ActionCable. ActionCable seamlessly integrates WebSockets into your application and offers both client-side JS and server-side Ruby frameworks. This way, you can write real-time features in the same styles as the rest your application, which is really cool.

Some months ago I wrote a series of articles describing how to build mini-chat with Rails using AJAX, WebSockets powered by Faye and Server-sent events. Those articles garnered some attention, so I decided to pen a new part of this series instructing how to use ActionCable to achieve the same goal.

This time, however, we will face a bit more complicated task and discuss the following topics:

  • Preparing application and integrating Devise
  • Introducing chat rooms
  • Setting up ActionCable
  • Coding client-side
  • Coding server-side with the help of background jobs
  • Introducing basic authorization for ActionCable
  • Preparing application to be deployed to Heroku

Continue reading %Create a Chat App with Rails 5, ActionCable, and Devise%


by Ilya Bodrov-Krukowski via SitePoint

No comments:

Post a Comment