Remove code to delete all comments on one line and restore default delete route for comments
This commit is contained in:
@ -12,14 +12,10 @@ class CommentPolicy < ApplicationPolicy
|
||||
everyone
|
||||
end
|
||||
|
||||
[:new?, :destroy?, :update?].each do |action|
|
||||
[:new?, :destroy?, :update?, :edit?].each do |action|
|
||||
define_method(action) { admin? || author? }
|
||||
end
|
||||
|
||||
def edit?
|
||||
admin?
|
||||
end
|
||||
|
||||
def index?
|
||||
everyone
|
||||
end
|
||||
|
Reference in New Issue
Block a user