Sha256: 7da0070ec4f3c186c168a1c0f44445e2c32baefcb649f66e509fb277cbcc1182
Contents?: true
Size: 753 Bytes
Versions: 44
Compression:
Stored size: 753 Bytes
Contents
# frozen_string_literal: true module Decidim module Meetings class RegistrationSerializer < Decidim::Exporters::Serializer include Decidim::TranslationsHelper # Serializes a registration def serialize { id: resource.id, code: resource.code, user: { name: resource.user.name, email: resource.user.email, user_group: resource.user_group&.name || "" }, registration_form_answers: serialize_answers } end private def serialize_answers Decidim::Forms::UserAnswersSerializer.new( resource.meeting.questionnaire.answers.where(user: resource.user) ).serialize end end end end
Version data entries
44 entries across 44 versions & 1 rubygems