From: Tom Hughes Date: Tue, 15 May 2012 17:58:13 +0000 (+0100) Subject: Don't show deleted comments in a user's diary comment list X-Git-Tag: live~5571 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/fc7ac5d086bb29acbe2b7341994e614445f99eb2 Don't show deleted comments in a user's diary comment list --- 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