diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 11e803a6f..0eed27323 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -36,8 +36,6 @@ class CommentsController < ApplicationController @commentable_type = @commentable.class.name if @commentable set_surrogate_key_header "comments-for-#{@commentable.id}-#{@commentable_type}" if @commentable - - render :deleted_commentable_comment unless @commentable end # rubocop:enable Metrics/CyclomaticComplexity # rubocop:enable Metrics/PerceivedComplexity diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index e00c8a26d..ca2f59cf0 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -19,7 +19,7 @@ <%= "comment--too-deep" if comment.depth > 3 %> " data-comment-id="<%= comment.id %>" - data-path="<%= commentable.path %>/comments/<%= comment.id_code_generated %>" + data-path="<%= commentable&.path %>/comments/<%= comment.id_code_generated %>" data-comment-author-id="<%= comment_user_id_unless_deleted comment %>" data-content-user-id="<%= comment_user_id_unless_deleted comment %>"> <%= render("comments/comment_proper", diff --git a/app/views/comments/_comment_header.html.erb b/app/views/comments/_comment_header.html.erb index bffdfc5d5..0f19bbc2d 100644 --- a/app/views/comments/_comment_header.html.erb +++ b/app/views/comments/_comment_header.html.erb @@ -30,7 +30,7 @@
Comment from a deleted article or podcast
-