comments: show "undo vote" link by default on voted comments (fix #4143).
This commit is contained in:
@@ -167,14 +167,14 @@ class Comment < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
def below_threshold?(user = CurrentUser.user)
|
||||
score < user.comment_threshold
|
||||
end
|
||||
|
||||
def editable_by?(user)
|
||||
creator_id == user.id || user.is_moderator?
|
||||
end
|
||||
|
||||
def voted_by?(user)
|
||||
user.id.in?(votes.map(&:user_id))
|
||||
end
|
||||
|
||||
def hidden_attributes
|
||||
super + [:body_index]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user