个人主页的项目列表有重复的项目

This commit is contained in:
cxt 2016-04-19 09:58:51 +08:00
parent 36d82e1315
commit 0cc5eca34b
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@
%>
<% if @user.projects.visible.count > 0
projects = @user.projects.visible.select("projects.*, (SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)
projects = @user.projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)
else
projects = []
end