fixed issue#314

This commit is contained in:
yanxd 2013-10-17 16:14:35 +08:00
parent 081a8e9825
commit ab5d8853b5
1 changed files with 5 additions and 4 deletions

View File

@ -148,9 +148,10 @@ class UsersController < ApplicationController
end end
end end
# added by fq # added by fq, modify by nyan
def user_courses def user_courses
@membership = @user.memberships.all(:conditions => Project.visible_condition(User.current)).reverse @membership = @user.memberships.all(:conditions => Project.visible_condition(User.current))
@membership.sort! {|older, newer| newer.created_on <=> older.created_on }
case params[:type] case params[:type]
when "2" when "2"
#@membership = @user.memberships.all(:conditions => Project.visible_condition(User.current)) #@membership = @user.memberships.all(:conditions => Project.visible_condition(User.current))