From 8af754e1087d662ab68964aa67685d48b8e7c4fc Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 10 Oct 2018 08:03:13 +0100 Subject: Run rails new testapp --skip-bundle --- testapp/app/assets/javascripts/cable.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 testapp/app/assets/javascripts/cable.js (limited to 'testapp/app/assets/javascripts/cable.js') diff --git a/testapp/app/assets/javascripts/cable.js b/testapp/app/assets/javascripts/cable.js new file mode 100644 index 0000000..739aa5f --- /dev/null +++ b/testapp/app/assets/javascripts/cable.js @@ -0,0 +1,13 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the `rails generate channel` command. +// +//= require action_cable +//= require_self +//= require_tree ./channels + +(function() { + this.App || (this.App = {}); + + App.cable = ActionCable.createConsumer(); + +}).call(this); -- cgit v1.2.3