Class: Course::Discussion::Post::Vote

Inherits:
ApplicationRecord show all
Defined in:
app/models/course/discussion/post/vote.rb

Class Method Summary collapse

Class Method Details

.downvotesObject

Gets all downvotes.


11
# File 'app/models/course/discussion/post/vote.rb', line 11

scope :downvotes, -> { where(vote_flag: false) }

.upvotesObject

Gets all upvotes.


7
# File 'app/models/course/discussion/post/vote.rb', line 7

scope :upvotes, -> { where(vote_flag: true) }