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