Class: Decidim::Meetings::RegistrationSerializer

Inherits:
Exporters::Serializer
  • Object
show all
Includes:
TranslationsHelper
Defined in:
app/serializers/decidim/meetings/registration_serializer.rb

Instance Method Summary collapse

Instance Method Details

#serializeObject

Serializes a registration



8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/serializers/decidim/meetings/registration_serializer.rb', line 8

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