Class: Decidim::ParticipatorySpacePrivateUser

Inherits:
ApplicationRecord show all
Includes:
DownloadYourData, ParticipatorySpaceUser
Defined in:
decidim-core/app/models/decidim/participatory_space_private_user.rb

Overview

This class gives a given User access to a given private ParticipatorySpacePrivateUser

Constant Summary

Constants included from ParticipatorySpaceUser

Decidim::ParticipatorySpaceUser::ROLES

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.export_serializerObject



17
18
19
# File 'decidim-core/app/models/decidim/participatory_space_private_user.rb', line 17

def self.export_serializer
  Decidim::DownloadYourDataSerializers::DownloadYourDataParticipatorySpacePrivateUserSerializer
end

.log_presenter_class_for(_log) ⇒ Object



21
22
23
# File 'decidim-core/app/models/decidim/participatory_space_private_user.rb', line 21

def self.log_presenter_class_for(_log)
  Decidim::AdminLog::ParticipatorySpacePrivateUserPresenter
end

.user_collection(user) ⇒ Object



13
14
15
# File 'decidim-core/app/models/decidim/participatory_space_private_user.rb', line 13

def self.user_collection(user)
  where(decidim_user_id: user.id)
end

Instance Method Details

#target_space_associationObject



29
# File 'decidim-core/app/models/decidim/participatory_space_private_user.rb', line 29

def target_space_association = :privatable_to