Sha256: 68fdfe58fea4b254e59719ae5d0df7d77edef414330cccfb457094135a1a9cea

Contents?: true

Size: 690 Bytes

Versions: 25

Compression:

Stored size: 690 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This class serializes a Identity so can be exported to CSV
  module DownloadYourDataSerializers
    class DownloadYourDataIdentitySerializer < Decidim::Exporters::Serializer
      include Decidim::ResourceHelper

      # Public: Exports a hash with the serialized data for this identities.
      def serialize
        {
          id: resource.id,
          provider: resource.provider,
          uid: resource.uid,
          user: {
            id: resource.user.id,
            name: resource.user.name
          },
          created_at: resource.created_at,
          updated_at: resource.updated_at
        }
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-core-0.27.2 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.1 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.0 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.0.rc2 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.0.rc1 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb