From 3e2810129b0ade5745db75c34a427d1c5741fa3d Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 7 Jun 2016 16:24:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=95=99=E8=A8=80=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=BF=87=E6=BB=A4=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index b247f5a41..a75a0e698 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -105,7 +105,7 @@ class OrganizationsController < ApplicationController end # 最新动态, 来自我关联的项目和课程 if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0 - @acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue', 'JournalsForMessage') and + @acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and ((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')}))) order by updated_at desc limit 6;") end