<h1><%= @resource.title %></h1>
<% if @resource.user %>
  <p>Added by <%= @resource.user_name %>.</p>
<% end %>

<ul>
  <% @resource.languages.each do |language| %>
    <li><%= link_to language.name, language_path(language) %></li>
  <% end %>
</ul>

<% if @resource.tags.first %>
  <h3>Tags:</h3>
  <ul>
    <% @resource.tags.each do |tag| %>
      <li><%= tag.name %></li>
    <% end %>
  </ul>
<% end %>

<p>URL: <%= link_to @resource.url, @resource.url %></p>

<h3>What it's about:</h3>
<p><%= @resource.description %></p>


<%= link_to "Edit this Resource", edit_resource_path(@resource) if correct_user? %>
<%= button_to "Delete this Resource", resource_path(@resource), method: 'delete' if correct_user?%>

<% if @resource.comments.first.content.present? %>
  <h3>Comments:</h3>
  <ul>
    <% @resource.comments.each do |comment| %>
      <% if comment.content.present? %>
      <li><%= comment.content %> <%= button_to "X", comment_path(comment), method: 'delete' if correct_user? %> </li>
      <% end %>
    <% end %>
  </ul>
<% end %>


<%= render template: "comments/new" %>

<h1><%= @resource.title %></h1>
<% if @resource.user %>
  <p>Added by <%= @resource.user_name %>.</p>
<% end %>

<ul>
  <% @resource.languages.each do |language| %>
    <li><%= link_to language.name, language_path(language) %></li>
  <% end %>
</ul>

<% if @resource.tags.first %>
  <h3>Tags:</h3>
  <ul>
    <% @resource.tags.each do |tag| %>
      <li><%= tag.name %></li>
    <% end %>
  </ul>
<% end %>

<p>URL: <%= link_to @resource.url, @resource.url %></p>

<h3>What it's about:</h3>
<p><%= @resource.description %></p>


<%= link_to "Edit this Resource", edit_resource_path(@resource) if correct_user? %>
<%= button_to "Delete this Resource", resource_path(@resource), method: 'delete' if correct_user?%>

<% if @resource.comments.first.content.present? %>
  <h3>Comments:</h3>
  <ul>
    <% @resource.comments.each do |comment| %>
      <% if comment.content.present? %>
      <li><%= comment.content %> - <%= link_to "Edit", edit_comment_path(comment) if correct_user? %> <%= button_to "X", comment_path(comment), method: 'delete' if correct_user? %> </li>
      <% end %>
    <% end %>
  </ul>
<% end %>


<%= render template: "comments/new" %>

Add edit link to comments in resource show page.
Add edit link to comments in resource show page.
