diff options
author | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2015-07-10 08:39:34 +1000 |
---|---|---|
committer | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2015-07-10 09:30:02 +1000 |
commit | 6661d78eb5fed567886e33806223d386b68d43fd (patch) | |
tree | ad326fe787360da95eb0099ab273da55d9cf7020 | |
parent | 0426068e6b9c56dd4ffd38491025743be6cbef7b (diff) | |
download | rails-6661d78eb5fed567886e33806223d386b68d43fd.tar.gz rails-6661d78eb5fed567886e33806223d386b68d43fd.tar.bz2 rails-6661d78eb5fed567886e33806223d386b68d43fd.zip |
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
-rw-r--r-- | README.md | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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" ``` |