about summary refs log tree commit diff
path: root/app/assets/javascripts/cable.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/cable.js')
-rw-r--r--app/assets/javascripts/cable.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js
new file mode 100644
index 000000000..71ee1e66d
--- /dev/null
+++ b/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);