Let everyone see all comments and polish request for comments overview

This commit is contained in:
Maximilian Grundke
2016-05-10 18:17:02 +02:00
parent 7e4c886b65
commit 87d4eb8b0d
5 changed files with 15 additions and 32 deletions

View File

@ -8,7 +8,11 @@ class CommentPolicy < ApplicationPolicy
everyone
end
[:new?, :show?, :destroy?].each do |action|
def show?
everyone
end
[:new?, :destroy?].each do |action|
define_method(action) { admin? || author? }
end