diff --git a/app/models/comment.rb b/app/models/comment.rb index 1b0b08660..571adec26 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -32,6 +32,10 @@ class Comment < ActiveRecord::Base where("score >= ?", user.comment_threshold) end + def undeleted + where("is_deleted = false") + end + def post_tags_match(query) PostQueryBuilder.new(query).build(self.joins(:post)).reorder("") end diff --git a/app/views/comments/index_by_comment.html.erb b/app/views/comments/index_by_comment.html.erb index 752fa1cf4..fbe15cf40 100644 --- a/app/views/comments/index_by_comment.html.erb +++ b/app/views/comments/index_by_comment.html.erb @@ -5,15 +5,17 @@