rfc can now be solved.

show.html still needs to be finished
This commit is contained in:
Ralf Teusner
2016-06-24 16:44:34 +02:00
parent bd6d4c4d71
commit 2a52b66daa
8 changed files with 58 additions and 8 deletions

View File

@@ -1,5 +1,8 @@
class RequestForCommentPolicy < ApplicationPolicy
def author?
@user == @record.author
end
private :author?
def create?
everyone
@@ -13,6 +16,10 @@ class RequestForCommentPolicy < ApplicationPolicy
define_method(action) { admin? }
end
def mark_as_solved?
admin? || author?
end
def edit?
admin?
end