Class: Decidim::Report

Inherits:
ApplicationRecord show all
Includes:
DataPortability
Defined in:
decidim-core/app/models/decidim/report.rb

Overview

A reportable can be reported one time for each user.

Constant Summary collapse

REASONS =
%w(spam offensive does_not_belong).freeze

Class Method Summary collapse

Class Method Details

.export_serializerObject


22
23
24
# File 'decidim-core/app/models/decidim/report.rb', line 22

def self.export_serializer
  Decidim::DataPortabilitySerializers::DataPortabilityReportSerializer
end

.user_collection(user) ⇒ Object


18
19
20
# File 'decidim-core/app/models/decidim/report.rb', line 18

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