Simple Rails 5 ActionCable Example
Here’s a very simple Rails application with ActionCable working. There is no authentication present, and no database tables required.
The application uses regular JavaScript instead of CoffeeScript, and is based off of the tutorials at http://edgeguides.rubyonrails.org/action_cable_overview.html and https://blog.heroku.com/real_time_rails_implementing_websockets_in_rails_5_with_action_cable
In the application, clicking the “On” and “Off” buttons will update the status, and the message will be sent to any other open browser windows.
Check out all of the commits on 2017-02-11 to see the steps required to get ActionCable working.