Module: Course::ActivityFeedsConcern

Extended by:
ActiveSupport::Concern
Included in:
CoursesController
Defined in:
app/controllers/concerns/course/activity_feeds_concern.rb

Instance Method Summary collapse

Instance Method Details

#recent_activity_feedsArray<Course::Notification>

Loads recent activity feeds of a given course.

Returns:


8
9
10
11
# File 'app/controllers/concerns/course/activity_feeds_concern.rb', line 8

def recent_activity_feeds
  return [] if current_course.nil?
  current_course.notifications.feed.order(created_at: :desc)
end