From fc7ac5d086bb29acbe2b7341994e614445f99eb2 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 15 May 2012 18:58:13 +0100 Subject: [PATCH] Don't show deleted comments in a user's diary comment list --- app/controllers/diary_entry_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index c45d369ac..68d3a81ee 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -188,7 +188,10 @@ class DiaryEntryController < ApplicationController def comments @comment_pages, @comments = paginate(:diary_comments, - :conditions => { :user_id => @this_user }, + :conditions => { + :user_id => @this_user, + :visible => true + }, :order => 'created_at DESC', :per_page => 20) @page = (params[:page] || 1).to_i -- 2.43.2