diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-13 11:29:32 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 22:49:41 +0200 |
commit | 39df53ff0aeac24d390eea52a1df6dfe103a4c14 (patch) | |
tree | 34157e5bff52bcbd7358b757ba5d2825b061cd50 /app/controllers/dashboard | |
parent | 4c8942f9b8cffe6bf513c4766e8f4260c0550b61 (diff) | |
download | gitlab-ce-39df53ff0aeac24d390eea52a1df6dfe103a4c14.tar.gz |
Use the default sort set by the `Sortable` concern
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r-- | app/controllers/dashboard/groups_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/dashboard/groups_controller.rb b/app/controllers/dashboard/groups_controller.rb index d14427cd7a7..6488e0b6c09 100644 --- a/app/controllers/dashboard/groups_controller.rb +++ b/app/controllers/dashboard/groups_controller.rb @@ -1,13 +1,11 @@ class Dashboard::GroupsController < Dashboard::ApplicationController def index - @sort = params[:sort] || 'id_desc' - @groups = GroupsFinder.new(current_user, all_available: false).execute # Only show root groups if no parent-id is given @groups = @groups.where(parent_id: params[:parent_id]) @groups = @groups.search(params[:filter]) if params[:filter].present? @groups = @groups.includes(:route) - @groups = @groups.sort(@sort) + @groups = @groups.sort(@sort = params[:sort]) @groups = @groups.page(params[:page]) respond_to do |format| |