aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js b/railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js
new file mode 100644
index 0000000000..76ca3d0f2f
--- /dev/null
+++ b/railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js
@@ -0,0 +1,6 @@
+// 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.
+
+import ActionCable from "actioncable"
+
+export default ActionCable.createConsumer()