summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
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