actioncable test

This commit is contained in:
Yan
2018-05-18 15:32:29 +06:30
parent 881593ce2c
commit 0e4d321142

View File

@@ -6,9 +6,9 @@ App.order = App.cable.subscriptions.create('BillChannel', {
disconnected: function() {}, disconnected: function() {},
received: function(data) { received: function(data) {
var hostname = location.hostname.strip; var hostname = location.hostname.trim();
console.log(hostname + data.from); console.log(hostname + data.from);
console.log(hostname==data.from); console.log(hostname==data.from.trim());
if(data.from == "" || hostname == data.from) if(data.from == "" || hostname == data.from)
{ {
if($('.table_'+data.table.id).hasClass('blue')){ if($('.table_'+data.table.id).hasClass('blue')){