discourse/app/controllers/admin/groups_controller.rb

20 lines
401 B
Ruby
Raw Normal View History

class Admin::GroupsController < Admin::AdminController
2013-05-08 13:20:38 +08:00
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
2013-05-08 13:20:38 +08:00
def users
group = Group.find(params[:group_id].to_i)
render_serialized(group.users, BasicUserSerializer)
end
end