aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorLachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au>2015-07-10 08:39:34 +1000
committerLachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au>2015-07-10 09:30:02 +1000
commit6661d78eb5fed567886e33806223d386b68d43fd (patch)
treead326fe787360da95eb0099ab273da55d9cf7020 /README.md
parent0426068e6b9c56dd4ffd38491025743be6cbef7b (diff)
downloadrails-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
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 8 insertions, 1 deletions
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"
```