From 8d522fe57e85ebde0af70b49464bb6936dd823ac Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 18 Jul 2019 15:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AF=84=E8=AE=BA=E7=9A=84?= =?UTF-8?q?=E5=AD=90=E5=9B=9E=E5=A4=8D=E4=B8=8D=E5=86=8D=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/discuss.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/discuss.rb b/app/models/discuss.rb index 00e3209c0..2d9c00110 100644 --- a/app/models/discuss.rb +++ b/app/models/discuss.rb @@ -41,9 +41,7 @@ class Discuss < ApplicationRecord # end def child_discuss(user) - user.admin? ? - Discuss.where(parent_id: self.id).includes(:user).reorder(created_at: :asc) : - Discuss.where(parent_id: self.id, :hidden => false).includes(:user).reorder(created_at: :asc) + Discuss.where(parent_id: self.id).includes(:user).reorder(created_at: :asc) end private