polyglot/app/channels/chat_rooms_channel.rb

10 lines
203 B
Ruby
Raw Permalink Normal View History

class ChatRoomsChannel < ApplicationCable::Channel
def subscribed
stream_from "chat_room_#{params[:room]}"
end
def unsubscribed
# Any cleanup needed when channel is unsubscribed
end
end