aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/app/javascript/action_cable/consumer.js
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/app/javascript/action_cable/consumer.js')
-rw-r--r--actioncable/app/javascript/action_cable/consumer.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/actioncable/app/javascript/action_cable/consumer.js b/actioncable/app/javascript/action_cable/consumer.js
index 731e00996d..c484ceebbd 100644
--- a/actioncable/app/javascript/action_cable/consumer.js
+++ b/actioncable/app/javascript/action_cable/consumer.js
@@ -1,6 +1,4 @@
-//= require ./connection
-//= require ./subscriptions
-//= require ./subscription
+import ActionCable from "./index"
// The ActionCable.Consumer establishes the connection to a server-side Ruby Connection object. Once established,
// the ActionCable.ConnectionMonitor will ensure that its properly maintained through heartbeats and checking for stale updates.
@@ -27,7 +25,8 @@
//
// Any channel subscriptions which existed prior to disconnecting will
// automatically resubscribe.
-ActionCable.Consumer = class Consumer {
+
+export default class Consumer {
constructor(url) {
this.url = url
this.subscriptions = new ActionCable.Subscriptions(this)