Class: ActivityNotification::NotificationChannel

Inherits:
Object
  • Object
show all
Defined in:
app/channels/activity_notification/notification_channel.rb

Overview

Action Cable channel to subscribe broadcasted notifications.

Instance Method Summary collapse

Instance Method Details

#subscribedObject

ActionCable::Channel::Base#subscribed



9
10
11
12
13
# File 'app/channels/activity_notification/notification_channel.rb', line 9

def subscribed
  stream_from "#{ActivityNotification.config.notification_channel_prefix}_#{@target.to_class_name}#{ActivityNotification.config.composite_key_delimiter}#{@target.id}"
rescue
  reject
end