update action cable and other bugs

This commit is contained in:
Aung Myo
2018-05-21 13:00:55 +06:30
parent e722ab88e9
commit 7e8b69aa7c
26 changed files with 749 additions and 537 deletions

View File

@@ -609,7 +609,12 @@ class SalePayment < ApplicationRecord
#Send to background job for processing
# OrderBroadcastJob.perform_later(table,type)
#if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "order_channel",table: table,type:type
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
end
ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
#end
end
end