diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 0199e4d90..8ad0dce79 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -475,7 +475,6 @@ class AdminController < ApplicationController else @limit = 15#per_page_option end - @status = params[:status] || 1 scope = User.logged.status(@status) scope = scope.like(params[:name],params[:search_by][:id]) if params[:name].present? @@ -483,8 +482,7 @@ class AdminController < ApplicationController @user_pages = Paginator.new @user_count, @limit, params['page'] @user_base_tag = params[:id] ? 'base_users':'base' - @users = scope.offset(@user_pages.offset).limit(@user_pages.per_page) - + @users = scope.order(sort_clause).offset(@user_pages.offset).limit(@user_pages.per_page).all respond_to do |format| format.html { @groups = Group.all.sort