discourse/app/serializers/invite_link_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
346 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class InviteLinkSerializer < ApplicationSerializer
attributes :id,
:invite_key,
:created_at,
:max_redemptions_allowed,
:redemption_count,
:expires_at,
:group_names
def group_names
object.groups.pluck(:name).join(", ")
end
end