Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 18:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 18:09:00 +0300
commitc282dba898a4cb0645f88579339502a4e3778727 (patch)
tree94a6457ce4438e085c9ae43bc51a2b5a29787bf2 /app/controllers/admin
parent2c2dd5e36c4ed5f09f488be288882d98f9124d12 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/groups_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb
index 5455cefdc8e..0245c00aacb 100644
--- a/app/controllers/admin/groups_controller.rb
+++ b/app/controllers/admin/groups_controller.rb
@@ -6,8 +6,7 @@ class Admin::GroupsController < Admin::ApplicationController
before_action :group, only: [:edit, :update, :destroy, :project_update, :members_update]
def index
- @groups = Group.with_statistics.with_route
- @groups = @groups.sort_by_attribute(@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
@@ -75,6 +74,10 @@ class Admin::GroupsController < Admin::ApplicationController
private
+ def groups
+ Group.with_statistics.with_route
+ end
+
def group
@group ||= Group.find_by_full_path(params[:id])
end