Skip to content

A platform for community discussion. Free, open, simple.

287 B
Raw Blame
# frozen_string_literal: true

class AiFeaturesAgentSerializer < ApplicationSerializer
  attributes :id, :name, :allowed_groups

  def allowed_groups
    Group
      .where(id: object.allowed_group_ids)
      .pluck(:id, :name)
      .map { |id, name| { id: id, name: name } }
  end
end