Class: Decidim::Debates::DownloadYourDataDebateSerializer

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

Instance Method Summary collapse

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