fix active record induced error on postgres by removing distinct.

Inlining the code did not turn out well, as we have to cope with the polymorphic association of user here..
This commit is contained in:
Ralf Teusner
2018-12-13 16:16:12 +01:00
parent 4fd128b31b
commit 8558c5041f

View File

@ -47,10 +47,10 @@ class RequestForComment < ApplicationRecord
def commenters
commenters = []
comments.distinct.to_a.each {|comment|
comments.each {|comment|
commenters.append comment.user
}
commenters.uniq {|user| user.id}
commenters.uniq
end
def self.with_last_activity