From ddf5590c5470467e647f72f044b55adccf208ba2 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 26 May 2014 17:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=AA=E4=BA=BA=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E6=9F=A5=E7=9C=8B=E5=85=B3=E6=B3=A8=E7=9A=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=97=B6=E6=8A=A5user=5Fid=E6=8C=87=E4=BB=A3=E4=B8=8D?= =?UTF-8?q?=E6=98=8E=E7=9A=84sql=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- app/views/users/list.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 82ea7e037..cdecb97f8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -565,7 +565,7 @@ class UsersController < ApplicationController end def watch_projects - @watch_projects = Project.joins(:watchers).where("project_type <>? and watchable_type = ? and user_id = ?", '1','Project', @user.id) + @watch_projects = Project.joins(:watchers).where("project_type <>? and watchable_type = ? and `watchers`.user_id = ?", '1','Project', @user.id) @state = 1 respond_to do |format| format.html { diff --git a/app/views/users/list.html.erb b/app/views/users/list.html.erb index 53948fdc2..a40b7c904 100644 --- a/app/views/users/list.html.erb +++ b/app/views/users/list.html.erb @@ -75,7 +75,7 @@ <% html_title(l(:label_user_plural)) -%>