Class: Decidim::Debates::DownloadYourDataDebateSerializer

Inherits:
Exporters::Serializer show all
Defined in:
decidim-debates/app/serializers/decidim/debates/download_your_data_debate_serializer.rb

Instance Attribute Summary

Attributes inherited from Exporters::Serializer

#resource

Instance Method Summary collapse

Methods inherited from Exporters::Serializer

#event_name, #finalize, #initialize, #run

Constructor Details

This class inherits a constructor from Decidim::Exporters::Serializer

Instance Method Details

#serializeObject

Serializes a Debate for download your data



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'decidim-debates/app/serializers/decidim/debates/download_your_data_debate_serializer.rb', line 7

def serialize
  {
    id: resource.id,
    title: resource.title,
    description: resource.description,
    instructions: resource.instructions,
    start_time: resource.start_time,
    end_time: resource.end_time,
    information_updates: resource.information_updates,
    reference: resource.reference,
    component: resource.component.name
  }
end