Sha256: 3b59c43ce072bf4a22d24cd1b56666067c80f0fb20ea8255f871412afd0a38b2

Contents?: true

Size: 303 Bytes

Versions: 8

Compression:

Stored size: 303 Bytes

Contents

module Marty
  class NotificationChannel < ::ApplicationCable::Channel
    def subscribed
      reject && return unless
        Rails.application.config.marty.enable_action_cable

      reject && return if current_user.blank?
      stream_from "marty_notifications_#{current_user.id}"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
marty-11.0.0 app/channels/marty/notification_channel.rb
marty-10.0.3 app/channels/marty/notification_channel.rb
marty-10.0.2 app/channels/marty/notification_channel.rb
marty-10.0.0 app/channels/marty/notification_channel.rb
marty-9.5.1 app/channels/marty/notification_channel.rb
marty-9.5.0 app/channels/marty/notification_channel.rb
marty-9.3.3 app/channels/marty/notification_channel.rb
marty-9.3.2 app/channels/marty/notification_channel.rb