提交 d8bc0964 编写于 作者: M Matthew Draper 提交者: GitHub

Merge pull request #25780 from Ropeney/patch-1

Update ActionCable Rebroadcasting a Message documentation
...@@ -333,7 +333,7 @@ class ChatChannel < ApplicationCable::Channel ...@@ -333,7 +333,7 @@ class ChatChannel < ApplicationCable::Channel
end end
def receive(data) def receive(data)
ChatChannel.broadcast_to("chat_#{params[:room]}", data) ActionCable.server.broadcast("chat_#{params[:room]}", data)
end end
end end
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册