one line the loop, thanks for the hint @MrSerth

This commit is contained in:
Ralf Teusner
2018-12-14 13:36:24 +01:00
parent 8558c5041f
commit 76079bb47d

View File

@ -46,11 +46,7 @@ class RequestForComment < ApplicationRecord
end
def commenters
commenters = []
comments.each {|comment|
commenters.append comment.user
}
commenters.uniq
comments.map(&:user).uniq
end
def self.with_last_activity