Files
sx-fc/app/channels/print_channel.rb
2020-08-06 14:05:20 +06:30

11 lines
227 B
Ruby

class PrintChannel < ApplicationCable::Channel
def subscribed
stream_from "print_channel_#{params[:shop_code]}"
end
def unsubscribed
# Any cleanup needed when channel is unsubscribed
stop_all_streams
end
end