Class: Decidim::DownloadYourDataSerializers::DownloadYourDataParticipatorySpacePrivateUserSerializer

Inherits:
Exporters::Serializer
  • Object
show all
Includes:
ResourceHelper
Defined in:
decidim-core/lib/decidim/download_your_data_serializers/download_your_data_participatory_space_private_user_serializer.rb

Instance Method Summary collapse

Instance Method Details

#serializeObject

Public: Exports a hash with the serialized data for this user.



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'decidim-core/lib/decidim/download_your_data_serializers/download_your_data_participatory_space_private_user_serializer.rb', line 10

def serialize
  {
    id: resource.id,
    privatable_to: {
      id: resource.privatable_to_id,
      type: resource.privatable_to_type,
      title: resource.privatable_to.title,
      slug: resource.privatable_to.slug
    },
    created_at: resource.created_at,
    updated_at: resource.updated_at
  }
end