Class: Decidim::Meetings::DownloadYourDataRegistrationSerializer

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

Instance Method Summary collapse

Instance Method Details

#serializeObject

Serializes a registration for download your data



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'app/serializers/decidim/meetings/download_your_data_registration_serializer.rb', line 7

def serialize
  {
    id: resource.id,
    code: resource.code,
    user: {
      name: resource.user.name,
      email: resource.user.email
    },
    meeting: {
      title: resource.meeting.title,
      description: resource.meeting.description,
      start_time: resource.meeting.start_time,
      end_time: resource.meeting.end_time,
      address: resource.meeting.address,
      location: resource.meeting.location,
      location_hints: resource.meeting.location_hints,
      reference: resource.meeting.reference,
      attendees_count: resource.meeting.attendees_count,
      attending_organizations: resource.meeting.attending_organizations,
      closed_at: resource.meeting.closed_at,
      closing_report: resource.meeting.closing_report,
      published_at: resource.meeting.published_at
    }
  }
end