From 6661d78eb5fed567886e33806223d386b68d43fd Mon Sep 17 00:00:00 2001 From: Lachlan Sylvester Date: Fri, 10 Jul 2015 08:39:34 +1000 Subject: Update readme to include requiring the cable js file and rename the example file for creating App.cable not conflict with the action cable js libs --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fbbfac5e4..a14b382776 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,15 @@ potentially disconnect them all if the user is deleted or deauthorized). The client-side needs to setup a consumer instance of this connection. That's done like so: +```javascript +//app/assets/javascripts/application.js + +//= require cable +``` + ```coffeescript -# app/assets/javascripts/cable.coffee +# app/assets/javascripts/application_cable.coffee + @App = {} App.cable = Cable.createConsumer "ws://cable.example.com" ``` -- cgit v1.2.3