diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 0d152d928..31b448088 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -8,7 +8,9 @@ <%= comment.user.name %> • <%= time_ago_in_words(comment.created_at) %>

<%= comment.body %>

-

<%= render 'comments/form', parent: comment %>

+ <% if user_signed_in? %> +

<%= render 'comments/form', {parent: comment, toggeable: true} %>

+ <% end %>
diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 01661221f..da2b3bb61 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -1,6 +1,6 @@ -<%= link_to comment_link_text(parent), "", class: "js-add-comment-link", data: {'id': dom_id(parent)} %> +<%= link_to(comment_link_text(parent), "", class: "js-add-comment-link", data: {'id': dom_id(parent)}) if toggeable %> -