# app/channels/appearance_channel.rb
class NotificationsChannel < ApplicationCable::Channel
def subscribed
stream_from "notifications"
end
def unsubscribed
end
def notify(data)
ActionCable.server.broadcast "notifications", { title: 'New things!', body: data }
end
end