修复bug

This commit is contained in:
nieguanghui 2013-10-28 08:51:15 +08:00
parent 6dec8a9312
commit 1f8c10e48a
1 changed files with 2 additions and 2 deletions

View File

@ -311,13 +311,13 @@ class UsersController < ApplicationController
else else
@offset ||= @user_pages.reverse_offset @offset ||= @user_pages.reverse_offset
unless @offset == 0 unless @offset == 0
@users_statuses = scope.reorder('changesets_count').offset(@offset).limit(@limit).all.reverse @users_statuses = scope.reorder('grade').offset(@offset).limit(@limit).all.reverse
else else
limit = @user_count % @limit limit = @user_count % @limit
if limit == 0 if limit == 0
limit = @limit limit = @limit
end end
@users_statuses = scope.reorder('changesets_count').offset(@offset).limit(limit).all.reverse @users_statuses = scope.reorder('grade').offset(@offset).limit(limit).all.reverse
end end
@s_type = 1 @s_type = 1
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on } # @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }