discourse/app/serializers/invite_link_serializer.rb
2020-06-09 20:49:32 +05:30

10 lines
268 B
Ruby

# 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