<div class="profile-header">
  <ul>
    <li class="profile-name"><%= @user.name %> Posts</li>
  </ul>
</div>

<% @user.comments.each do |comment| %>
  <div class="vote-container">
    <% if current_user %>
      <%= link_to image_tag("snowflake.png", class: "snowflake"), {:controller => "votes",
          :action => "create",
          :comment_id => comment.id,
          :user_id => current_user.id,
          :value => "1"},
          :method => "post" %>
    <% else %>
      <%= link_to image_tag("snowflake.png", class: "snowflake") %>
    <% end %>
    <br>
    <%= comment.votes.sum(:value) %>
  </div>
  <div class="comment-container">
    <ul>
      <li><p class="comment"><%= comment.content%></p></li><br>
      <li><%= comment.trail.name %> @ <%= comment.trail.mountain.name %></li>
    </ul>
  </div>
<% end %>
<div class="profile-header">
  <h3><%= @user.name %> Posts</h3>
</div>

<% @user.comments.each do |comment| %>
  <div class="vote-container">
    <% if current_user %>
      <%= link_to image_tag("snowflake.png", class: "snowflake"), {:controller => "votes",
          :action => "create",
          :comment_id => comment.id,
          :user_id => current_user.id,
          :value => "1"},
          :method => "post" %>
    <% else %>
      <%= link_to image_tag("snowflake.png", class: "snowflake") %>
    <% end %>
    <br>
    <%= comment.votes.sum(:value) %>
  </div>
  <div class="comment-container">
    <ul>
      <li><p class="comment"><%= comment.content%></p></li><br>
      <li><%= comment.trail.name %> @ <%= comment.trail.mountain.name %></li>
    </ul>
  </div>
<% end %>

<% if @user.comments.empty? %>
  <p class='about'>Looks like you haven't posted yet! <br> Find your favorite trails and leave comments for other riders.</p>
<% end %>

<div class="go-back">
  <h4><%= link_to '&larr; Previous Page'.html_safe, request.referer.present? ? request.referer : default_path %></h4>
</div>
Include statement for no posts, navigation to previous page
Include statement for no posts, navigation to previous page
