Class: Hyrax::NotificationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Hyrax::NotificationsController
- Defined in:
- app/controllers/hyrax/notifications_controller.rb
Instance Method Summary collapse
Instance Method Details
#delete_all ⇒ Object
16 17 18 19 |
# File 'app/controllers/hyrax/notifications_controller.rb', line 16 def delete_all user_mailbox.delete_all redirect_to hyrax.notifications_path, alert: t('hyrax.mailbox.notifications_deleted') end |
#destroy ⇒ Object
21 22 23 24 25 |
# File 'app/controllers/hyrax/notifications_controller.rb', line 21 def destroy = params[:id] alert = user_mailbox.destroy() redirect_to hyrax.notifications_path, alert: alert end |
#index ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/hyrax/notifications_controller.rb', line 7 def index t(:'hyrax.controls.home'), root_path t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path t(:'hyrax.admin.sidebar.notifications'), hyrax.notifications_path @messages = user_mailbox.inbox # Update the notifications now that there are zero unread StreamNotificationsJob.perform_later(current_user) end |