This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/controllers/admin/groups_controller.rb
2013-05-08 15:20:38 +10:00

20 lines
401 B
Ruby

class Admin::GroupsController < Admin::AdminController
def index
groups = Group.order(:name).all
render_serialized(groups, AdminGroupSerializer)
end
def refresh_automatic_groups
Group.refresh_automatic_groups!
render json: "ok"
end
def show
end
def users
group = Group.find(params[:group_id].to_i)
render_serialized(group.users, BasicUserSerializer)
end
end