comment votes: let mods see comment voters.

This commit is contained in:
evazion
2020-04-02 20:47:36 -05:00
parent e957fccd7f
commit 9312e0c78c

View File

@@ -9,7 +9,7 @@ class CommentVote < ApplicationRecord
validates_inclusion_of :score, :in => [-1, 1], :message => "must be 1 or -1"
def self.visible(user)
if user.is_admin?
if user.is_moderator?
all
elsif user.is_member?
where(user: user)