Allow downvoting admin comments.
This commit is contained in:
@@ -39,9 +39,6 @@ class CommentVote < ActiveRecord::Base
|
|||||||
if is_positive? && comment.creator == CurrentUser.user
|
if is_positive? && comment.creator == CurrentUser.user
|
||||||
errors.add :base, "You cannot upvote your own comments"
|
errors.add :base, "You cannot upvote your own comments"
|
||||||
false
|
false
|
||||||
elsif is_negative? && comment.creator.is_admin?
|
|
||||||
errors.add :base, "You cannot downvote an admin comment"
|
|
||||||
false
|
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user