summaryrefslogtreecommitdiff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2018-04-04 09:19:47 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-04-04 09:19:47 +0000
commit3d3b46f344748420a638f8a66745d974fa2c2748 (patch)
treeaf54ae3abd6f99cecb02107344c340d441fa2829 /app/controllers/admin
parente9ea520878b740ec0a66a2789f4955cfbdf17447 (diff)
downloadgitlab-ce-3d3b46f344748420a638f8a66745d974fa2c2748.tar.gz
[Rails5] Rename `sort` methods to `sort_by_attribute`
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/groups_controller.rb2
-rw-r--r--app/controllers/admin/users_controller.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb
index cc38608eda5..001f6520093 100644
--- a/app/controllers/admin/groups_controller.rb
+++ b/app/controllers/admin/groups_controller.rb
@@ -5,7 +5,7 @@ class Admin::GroupsController < Admin::ApplicationController
def index
@groups = Group.with_statistics.with_route
- @groups = @groups.sort(@sort = params[:sort])
+ @groups = @groups.sort_by_attribute(@sort = params[:sort])
@groups = @groups.search(params[:name]) if params[:name].present?
@groups = @groups.page(params[:page])
end
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 156a8e2c515..bfeb5a2d097 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -4,7 +4,7 @@ class Admin::UsersController < Admin::ApplicationController
def index
@users = User.order_name_asc.filter(params[:filter])
@users = @users.search_with_secondary_emails(params[:search_query]) if params[:search_query].present?
- @users = @users.sort(@sort = params[:sort])
+ @users = @users.sort_by_attribute(@sort = params[:sort])
@users = @users.page(params[:page])
end