Permalink
Browse files

Move ActionCable channels to application pack

  • Loading branch information...
calleerlandsson committed Feb 1, 2019
1 parent 57a76f7 commit fb1e73e2a64b27be7c224f69bf72c7a082e9b81e

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,19 @@
import consumer from "./consumer"

consumer.subscriptions.create("ChatChannel", {
connected: function() {
// Called when the subscription is ready for use on the server
},

disconnected: function() {
// Called when the subscription has been terminated by the server
},

received: function(data) {
// Called when there's incoming data on the websocket for this channel
},

speak: function() {
return this.perform('speak')
}
})
@@ -0,0 +1,3 @@
import { createConsumer } from "@rails/actioncable"

export default createConsumer()
@@ -0,0 +1,2 @@
const channels = require.context('.', true, /_channel\.js$/)
channels.keys().forEach(channels)
@@ -10,3 +10,4 @@
require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
@@ -2,6 +2,7 @@
"name": "webpacker-rails-5-2",
"private": true,
"dependencies": {
"@rails/actioncable": "^6.0.0-alpha",
"@rails/activestorage": "^6.0.0-alpha",
"@rails/ujs": "^6.0.0-alpha",
"@rails/webpacker": "3.5",

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit fb1e73e

Please sign in to comment.