comments: add scores, rework comment menu.
* Add comment scores. * Rework voting buttons so that you can click the upvote/downvote buttons to toggle votes. * Hide the edit, delete, undelete, and report buttons behind a popup menu. * Show the upvote/downvote/reply buttons to logged out users. Redirect them to the login page instead.
This commit is contained in:
@@ -20,12 +20,7 @@ class CommentPolicy < ApplicationPolicy
|
||||
end
|
||||
|
||||
def reply?
|
||||
create? && !record.is_deleted?
|
||||
end
|
||||
|
||||
def vote?
|
||||
# XXX should use CommentVotePolicy
|
||||
unbanned? && !record.is_deleted?
|
||||
!record.is_deleted?
|
||||
end
|
||||
|
||||
def permitted_attributes_for_create
|
||||
|
||||
Reference in New Issue
Block a user