Class: Course::UserNotificationsController

Inherits:
Controller show all
Defined in:
app/controllers/course/user_notifications_controller.rb

Instance Method Summary collapse

Methods included from ApplicationSignInCallbacksConcern

#sign_in

Methods included from ApplicationPaginationConcern

#page_param

Methods included from ApplicationAnnouncementsConcern

#global_announcements, #unread_global_announcements

Methods included from ApplicationInstanceUserConcern

#current_instance_user

Methods included from ApplicationUserTimeZoneConcern

#set_time_zone

Methods included from ApplicationUserConcern

#handle_access_denied, #publicly_accessible?

Methods included from ApplicationComponentsConcern

#handle_component_not_found

Instance Method Details

#fetchObject


5
6
7
# File 'app/controllers/course/user_notifications_controller.rb', line 5

def fetch
  render json: next_popup_notification, status: :ok
end

#mark_as_readObject


9
10
11
12
# File 'app/controllers/course/user_notifications_controller.rb', line 9

def mark_as_read
  @user_notification.mark_as_read! for: current_user
  render json: next_popup_notification, status: :ok
end