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:
@ -47,10 +47,10 @@ class RequestForComment < ApplicationRecord
|
|||||||
|
|
||||||
def commenters
|
def commenters
|
||||||
commenters = []
|
commenters = []
|
||||||
comments.distinct.to_a.each {|comment|
|
comments.each {|comment|
|
||||||
commenters.append comment.user
|
commenters.append comment.user
|
||||||
}
|
}
|
||||||
commenters.uniq {|user| user.id}
|
commenters.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.with_last_activity
|
def self.with_last_activity
|
||||||
|
Reference in New Issue
Block a user