push commenters to RFC model

This commit is contained in:
Maximilian Grundke
2017-09-13 07:06:55 +02:00
parent 453d8fcb85
commit 4baab7430c
2 changed files with 10 additions and 5 deletions

View File

@ -38,6 +38,14 @@ class RequestForComment < ActiveRecord::Base
submission.files.map { |file| file.comments.size}.sum
end
def commenters
commenters = []
comments.distinct.to_a.each {|comment|
commenters.append comment.user
}
commenters.uniq {|user| user.id}
end
def to_s
"RFC-" + self.id.to_s
end