Sha256: 37eb17db0513c4e5423977415b523b1d94258ba58166bcf62897eb8bd1ded487

Contents?: true

Size: 317 Bytes

Versions: 25

Compression:

Stored size: 317 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  class NotificationsChannel < ApplicationCable::Channel
    def subscribed
      stream_for current_user
    end

    def unsubscribed
      stop_all_streams
    end

    def update_locale(data)
      current_user.update(preferred_locale: data['locale'])
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/channels/hyrax/notifications_channel.rb
hyrax-5.0.0 app/channels/hyrax/notifications_channel.rb
hyrax-5.0.0.rc3 app/channels/hyrax/notifications_channel.rb
hyrax-5.0.0.rc2 app/channels/hyrax/notifications_channel.rb
hyrax-5.0.0.rc1 app/channels/hyrax/notifications_channel.rb
hyrax-3.6.0 app/channels/hyrax/notifications_channel.rb
hyrax-4.0.0 app/channels/hyrax/notifications_channel.rb
hyrax-4.0.0.rc3 app/channels/hyrax/notifications_channel.rb
hyrax-4.0.0.rc2 app/channels/hyrax/notifications_channel.rb
hyrax-4.0.0.rc1 app/channels/hyrax/notifications_channel.rb
hyrax-3.5.0 app/channels/hyrax/notifications_channel.rb
hyrax-4.0.0.beta2 app/channels/hyrax/notifications_channel.rb
hyrax-3.4.2 app/channels/hyrax/notifications_channel.rb
hyrax-4.0.0.beta1 app/channels/hyrax/notifications_channel.rb
hyrax-3.4.1 app/channels/hyrax/notifications_channel.rb
hyrax-3.4.0 app/channels/hyrax/notifications_channel.rb
hyrax-3.3.0 app/channels/hyrax/notifications_channel.rb
hyrax-3.2.0 app/channels/hyrax/notifications_channel.rb
hyrax-3.1.0 app/channels/hyrax/notifications_channel.rb
hyrax-3.0.2 app/channels/hyrax/notifications_channel.rb