【发布时间】:2017-06-16 16:48:01
【问题描述】:
我得到了这个频道:
class TestChannel < ApplicationCable::Channel
def subscribed
stream_from 'test'
ActionCable.server.broadcast 'Test', vehicles: Vehice.find_by id: 13
end
end
当有人订阅时,我不想向所有订阅者广播。
我正在考虑通过添加'message' 来更改confirm_subscription。
有人能告诉我这是否可能吗?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-5 actioncable