修复bug
This commit is contained in:
parent
6dec8a9312
commit
1f8c10e48a
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue