From c77299cd05f62fc844cd5039dee71a31010458d0 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Mon, 31 Oct 2016 16:26:26 -0500 Subject: [PATCH] prevent deleted comments from showing in profile --- models/comment.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/comment.rb b/models/comment.rb index 0aa297b9..33838c58 100644 --- a/models/comment.rb +++ b/models/comment.rb @@ -4,6 +4,8 @@ class Comment < Sequel::Model many_to_one :actioning_site, class: :Site one_to_many :comment_likes + dataset.exclude! is_deleted: true + def liking_site_titles comment_likes_dataset.select(:id, :actioning_site_id).all.collect do |comment_like| comment_like.actioning_site_dataset.select(:username,:domain,:title).first.title