pundit: convert comments to pundit.

This commit is contained in:
evazion
2020-03-15 15:37:34 -05:00
parent d8e4a26906
commit a0c4617057
7 changed files with 58 additions and 45 deletions

View File

@@ -28,7 +28,7 @@
<% end %>
</div>
<% if CurrentUser.is_member? %>
<% if policy(Comment).create? %>
<div class="new-comment">
<p><%= link_to "Post comment", new_comment_path(comment: { post_id: post.id }), :class => "expand-comment-response" %></p>
<%= render "comments/form", comment: post.comments.new, hidden: true %>