<div class="vote-count row-centered">
  <% if post.has_voted?(current_user) %>
    <div class="warning">
      <span class="glyphicon glyphicon-chevron-up"></span><br/>
      <span><%= post.votes.count %></span><br>
      <span class="small">votes</span>
    </div>
  <% else %>
    <%= link_to vote_post_path(post), method: :put do %>
      <span class="glyphicon glyphicon-chevron-up"></span><br/>
      <span><%= post.votes.count %></span><br>
      <span class="small">votes</span>
    <% end %>
  <% end %>
</div>

<div class="vote-count row-centered">
  <% if current_user %>
    <% if post.has_voted?(current_user) %>
      <div class="warning">
        <span class="glyphicon glyphicon-chevron-up"></span><br/>
        <span><%= post.votes.count %></span><br>
        <span class="small">votes</span>
      </div>
    <% else %>
      <%= link_to vote_post_path(post), method: :put do %>
        <span class="glyphicon glyphicon-chevron-up"></span><br/>
        <span><%= post.votes.count %></span><br>
        <span class="small">votes</span>
      <% end %>
    <% end %>
  <% else %>
    <div>
      <span class="glyphicon glyphicon-chevron-up"></span><br/>
      <span><%= post.votes.count %></span><br>
      <span class="small">votes</span>
    </div>
  <% end %>
</div>

Fix votes when user is not logged in
Fix votes when user is not logged in
