summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-09-12 14:58:44 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 22:49:41 +0200
commit3e6dd7d88daaac2dbafc234753942086e0ba0403 (patch)
treee80888fc0580c78e71db4b0b57c4b088c9c64d0c /app/controllers/dashboard
parent960559aa6889a0b5ac1d46b84b7f7977a57d50ca (diff)
downloadgitlab-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.rb9
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