Sha256: 51a2d05787ae18f027b5e6f41afd63e32145f5f79b3749fe8b4f96aade93d85d
Contents?: true
Size: 415 Bytes
Versions: 12
Compression:
Stored size: 415 Bytes
Contents
class ActivityLogChannel < ApplicationCable::Channel def subscribed stream_from "messages" end def unsubscribed # Any cleanup needed when channel is unsubscribed end def receive(data) ActionCable.server.broadcast("messages", {message: "ActionCable is connected and received: #{data["message"]}", topic: data["topic"].presence || "general"}) if data["namespace"] == "subscriptions" end end
Version data entries
12 entries across 12 versions & 1 rubygems