修复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
@offset ||= @user_pages.reverse_offset
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
limit = @user_count % @limit
if limit == 0
limit = @limit
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
@s_type = 1
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }