Sha256: 67190968dbd47529d324258b3439c81f7d65ca22faf280444a0affbda6af7832
Contents?: true
Size: 422 Bytes
Versions: 54
Compression:
Stored size: 422 Bytes
Contents
module Dorsale::CommentPolicyHelper POLICY_METHODS = [ :create?, :update?, :delete?, ] def create? return false unless can_read_commentable? super end def update? return false unless can_read_commentable? super end def delete? return false unless can_read_commentable? super end private def can_read_commentable? policy(comment.commentable).read? end end
Version data entries
54 entries across 54 versions & 1 rubygems