pundit: convert posts to pundit.
This commit is contained in:
@@ -4,7 +4,7 @@ $("#score-for-post-<%= @post.id %>").text(<%= @post.score %>);
|
||||
$("#favcount-for-post-<%= @post.id %>").text(<%= @post.fav_count %>);
|
||||
$(".fav-buttons").toggleClass("fav-buttons-false").toggleClass("fav-buttons-true");
|
||||
|
||||
<% if CurrentUser.is_gold? %>
|
||||
<% if policy(@post).can_view_favlist? %>
|
||||
var fav_count = <%= @post.fav_count %>;
|
||||
$("#favlist").html("<%= j post_favlist(@post) %>");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user