From 86f0889f5b09b1ea8555f51602b87823d7bca532 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Sep 2015 16:53:09 +0800 Subject: [PATCH] =?UTF-8?q?"=E6=88=91=E7=9A=84=E5=8A=A8=E6=80=81"=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=BD=93=E5=89=8D=E7=94=A8=E6=88=B7=E7=9A=84=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6669a43d7..5db53b07b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -863,7 +863,7 @@ class UsersController < ApplicationController when "project_message" @user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Message'").order('created_at desc').limit(10).offset(@page * 10) when "current_user" - @user_activities = UserActivity.where("user_id = #{User.current.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))").order('created_at desc').limit(10).offset(@page * 10) + @user_activities = UserActivity.where("user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))").order('created_at desc').limit(10).offset(@page * 10) else @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types})").order('created_at desc').limit(10).offset(@page * 10) end