Class: Hyrax::NotificationsChannel
- Inherits:
-
ApplicationCable::Channel
- Object
- ActionCable::Channel::Base
- ApplicationCable::Channel
- Hyrax::NotificationsChannel
- Defined in:
- app/channels/hyrax/notifications_channel.rb
Instance Method Summary collapse
Instance Method Details
#subscribed ⇒ Object
4 5 6 |
# File 'app/channels/hyrax/notifications_channel.rb', line 4 def subscribed stream_for current_user end |
#unsubscribed ⇒ Object
8 9 10 |
# File 'app/channels/hyrax/notifications_channel.rb', line 8 def unsubscribed stop_all_streams end |
#update_locale(data) ⇒ Object
12 13 14 |
# File 'app/channels/hyrax/notifications_channel.rb', line 12 def update_locale(data) current_user.update(preferred_locale: data['locale']) end |