add out of stock action cable

This commit is contained in:
NyanLinHtut
2020-01-12 15:45:56 +06:30
parent 314cc507a3
commit 8e3f745175
7 changed files with 80 additions and 15 deletions

View File

@@ -0,0 +1,10 @@
class OutOfStockChannel < ApplicationCable::Channel
def subscribed
stream_from "out_of_stock_channel"
end
def unsubscribed
stop_all_streams
# Any cleanup needed when channel is unsubscribed
end
end