blob: 0df086e1fb20d9fbb22ac69419720160fe8edbf1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
class Dashboard::GroupsController < Dashboard::ApplicationController
include GroupsTree
def index
parent = nil
parent = Group.find_by(id: params[:parent_id]) if params[:parent_id]
@groups = find_groups(parent, all_available: false)
respond_to do |format|
format.html
format.json do
render json: GroupSerializer
.new(current_user: @current_user)
.with_pagination(request, response)
.represent(@groups)
end
end
end
end
|