chuckya/app/assets/javascripts/channels/timeline.js

14 lines
277 B
JavaScript
Raw Normal View History

2016-08-18 22:49:51 +09:00
App.timeline = App.cable.subscriptions.create("TimelineChannel", {
connected: function() {
console.log('Connected');
},
disconnected: function() {
console.log('Disconnected');
},
received: function(data) {
console.log(JSON.parse(data.message));
}
});