diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-12 14:58:44 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 22:49:41 +0200 |
commit | 3e6dd7d88daaac2dbafc234753942086e0ba0403 (patch) | |
tree | e80888fc0580c78e71db4b0b57c4b088c9c64d0c /app/controllers/dashboard | |
parent | 960559aa6889a0b5ac1d46b84b7f7977a57d50ca (diff) | |
download | gitlab-ce-3e6dd7d88daaac2dbafc234753942086e0ba0403.tar.gz |
Use same response-body in groups-dashboard as we do for group-home
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r-- | app/controllers/dashboard/groups_controller.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/dashboard/groups_controller.rb b/app/controllers/dashboard/groups_controller.rb index 8057a0b455c..600ef890f39 100644 --- a/app/controllers/dashboard/groups_controller.rb +++ b/app/controllers/dashboard/groups_controller.rb @@ -15,7 +15,7 @@ class Dashboard::GroupsController < Dashboard::ApplicationController current_user.groups end - @groups = @groups.search(params[:filter_groups]) if params[:filter_groups].present? + @groups = @groups.search(params[:filter]) if params[:filter].present? @groups = @groups.includes(:route) @groups = @groups.sort(@sort) @groups = @groups.page(params[:page]) @@ -23,10 +23,9 @@ class Dashboard::GroupsController < Dashboard::ApplicationController respond_to do |format| format.html format.json do - render json: GroupSerializer - .new(current_user: @current_user) - .with_pagination(request, response) - .represent(@groups) + serializer = GroupChildSerializer.new(current_user: current_user) + .with_pagination(request, response) + render json: serializer.represent(@groups) end end end |