Class: Decidim::Conferences::OpenDataConferenceSerializer
- Inherits:
-
Exporters::ParticipatorySpaceSerializer
- Object
- Exporters::ParticipatorySpaceSerializer
- Decidim::Conferences::OpenDataConferenceSerializer
- Defined in:
- app/serializers/decidim/conferences/open_data_conference_serializer.rb
Overview
This class serializes a Conference so it can be exported to CSV for the Open Data feature.
Direct Known Subclasses
Instance Method Summary collapse
-
#serialize ⇒ Object
Public: Exports a hash with the serialized data for this conference.
Instance Method Details
#serialize ⇒ Object
Public: Exports a hash with the serialized data for this conference.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/serializers/decidim/conferences/open_data_conference_serializer.rb', line 8 def serialize super.merge( { url: EngineRouter.main_proxy(resource).conference_url(resource), slogan: resource.slogan, remote_hero_image_url: Decidim::Conferences::ConferencePresenter.new(resource).hero_image_url, remote_banner_image_url: Decidim::Conferences::ConferencePresenter.new(resource)., location: resource.location, objectives: resource.objectives, start_date: resource.start_date, end_date: resource.end_date, scopes_enabled: resource.scopes_enabled, decidim_scope_id: resource.decidim_scope_id, scope: { id: resource.scope.try(:id), name: resource.scope.try(:name) || empty_translatable } } ) end |