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
3 4 5 |
# File 'app/channels/hyrax/notifications_channel.rb', line 3 def subscribed stream_for current_user end |
#unsubscribed ⇒ Object
7 8 9 |
# File 'app/channels/hyrax/notifications_channel.rb', line 7 def unsubscribed stop_all_streams end |
#update_locale(data) ⇒ Object
11 12 13 |
# File 'app/channels/hyrax/notifications_channel.rb', line 11 def update_locale(data) current_user.update(preferred_locale: data['locale']) end |