<%-
# votes
# forum_post
%>

<% votes.by(CurrentUser.user.id).each do |vote| %>
  <%= render "forum_post_votes/vote", vote: vote, forum_post: forum_post %>
<% end %>

<% votes.excluding_user(CurrentUser.user.id).each do |vote| %>
  <%= render "forum_post_votes/vote", vote: vote, forum_post: forum_post %>
<% end %>

<% if policy(forum_post).votable? && !votes.by(CurrentUser.user.id).exists? %>
  <%= render "forum_post_votes/add_vote", vote: votes.by(CurrentUser.user.id).first, forum_post: forum_post %>
<% end %>
