Module: Course::ForumParticipationConcern::ClassMethods

Defined in:
app/models/concerns/course/forum_participation_concern.rb

Instance Method Summary collapse

Instance Method Details

#forum_postsObject


6
7
8
# File 'app/models/concerns/course/forum_participation_concern.rb', line 6

def forum_posts
  joins(:topic).where('course_discussion_topics.actable_type = ?', Course::Forum::Topic.name)
end

#from_course(course) ⇒ Object


10
11
12
# File 'app/models/concerns/course/forum_participation_concern.rb', line 10

def from_course(course)
  joins(:topic).where('course_discussion_topics.course_id = ?', course.id)
end