Remove code to delete all comments on one line and restore default delete route for comments

This commit is contained in:
Maximilian Grundke
2017-08-25 18:15:02 +02:00
parent 771793f32e
commit 6aaa0f3bca
3 changed files with 5 additions and 22 deletions

View File

@ -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