修复个人主页查看关注的项目时报user_id指代不明的sql错误

This commit is contained in:
z9hang 2014-05-26 17:04:55 +08:00
parent 5d4eec010e
commit ddf5590c54
2 changed files with 2 additions and 2 deletions

View File

@ -565,7 +565,7 @@ class UsersController < ApplicationController
end end
def watch_projects 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 @state = 1
respond_to do |format| respond_to do |format|
format.html { format.html {

View File

@ -75,7 +75,7 @@
<div class="pagination"> <div class="pagination">
<ul> <ul>
<%= pagination_links_full @user_pages, @user_count %> <%= pagination_links_full @user_pages, @user_count %>
<ul> </ul>
</div> </div>
<!-- </p> --> <!-- </p> -->
<% html_title(l(:label_user_plural)) -%> <% html_title(l(:label_user_plural)) -%>