Sha256: a4675b3ee0c4861f3ea85e04ab7c0bcc5613bbb33fd2fba7949a31ae6409601c
Contents?: true
Size: 842 Bytes
Versions: 49
Compression:
Stored size: 842 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim # This concern contains the logic related to data portability. module DataPortability extend ActiveSupport::Concern included do # Returns a collection scoped by user. # This is the default, if you want, you can overwrite in each Class to be export. def self.user_collection(user) return unless user.is_a?(Decidim::User) where(decidim_author_id: user.id, decidim_author_type: "Decidim::UserBaseEntity") end # Returns a Default export serializer def self.export_serializer Decidim::Exporters::Serializer end # Returns a collection of images scoped by User. # Returns nil for default. def self.data_portability_images(_user) nil end end end end
Version data entries
49 entries across 49 versions & 1 rubygems