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.29.1 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.28.4 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.9 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.29.0 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.28.3 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.8 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.29.0.rc4 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.29.0.rc3 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.29.0.rc2 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.29.0.rc1 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.28.2 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.7 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.28.1 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.6 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.28.0 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.5 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.28.0.rc5 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.28.0.rc4 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.4 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb
decidim-core-0.27.3 lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb