aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/rails/generators/channel/templates/assets/cable.js.tt
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/lib/rails/generators/channel/templates/assets/cable.js.tt')
-rw-r--r--actioncable/lib/rails/generators/channel/templates/assets/cable.js.tt13
1 files changed, 13 insertions, 0 deletions
diff --git a/actioncable/lib/rails/generators/channel/templates/assets/cable.js.tt b/actioncable/lib/rails/generators/channel/templates/assets/cable.js.tt
new file mode 100644
index 0000000000..739aa5f022
--- /dev/null
+++ b/actioncable/lib/rails/generators/channel/templates/assets/cable.js.tt
@@ -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);