Merge pull request #247 from openHPI/fix_commentors_query
fix active record induced error on postgres by removing distinct.
This commit is contained in:
@ -46,11 +46,7 @@ class RequestForComment < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def commenters
|
def commenters
|
||||||
commenters = []
|
comments.map(&:user).uniq
|
||||||
comments.distinct.to_a.each {|comment|
|
|
||||||
commenters.append comment.user
|
|
||||||
}
|
|
||||||
commenters.uniq {|user| user.id}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.with_last_activity
|
def self.with_last_activity
|
||||||
|
Reference in New Issue
Block a user