class Decidim::DataPortabilitySerializers::DataPortabilityFollowSerializer

Public Instance Methods

serialize() click to toggle source

Public: Exports a hash with the serialized data for follow.

# File lib/decidim/data_portability_serializers/data_portability_follow_serializer.rb, line 10
def serialize
  {
    id: resource.id,
    followable: {
      id: resource.decidim_followable_id,
      type: resource.decidim_followable_type
    },
    created_at: resource.created_at,
    updated_at: resource.updated_at
  }
end