hides comment forms from not logged users

Closes #66
This commit is contained in:
Juanjo Bazán
2015-08-05 14:12:58 +02:00
parent e6ac2a4337
commit 8d87a69e0f
6 changed files with 29 additions and 6 deletions

View File

@@ -8,7 +8,9 @@
<%= comment.user.name %>&nbsp;&bullet;&nbsp;<%= time_ago_in_words(comment.created_at) %>
</span>
<p><%= comment.body %></p>
<p class="reply"><%= render 'comments/form', parent: comment %></p>
<% if user_signed_in? %>
<p class="reply"><%= render 'comments/form', {parent: comment, toggeable: true} %></p>
<% end %>
</div>
<div class="comment-children">