Class: NotificationsChannel

Inherits:
ApplicationCable::Channel show all
Defined in:
app/channels/fiat_notifications/notifications_channel.rb

Overview

Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.

Instance Method Summary collapse

Instance Method Details

#subscribedObject



3
4
5
# File 'app/channels/fiat_notifications/notifications_channel.rb', line 3

def subscribed
  stream_from "notifications:#{current_user.id}"
end

#unsubscribedObject



7
8
9
# File 'app/channels/fiat_notifications/notifications_channel.rb', line 7

def unsubscribed
  stop_all_streams
end