Sha256: 73b39dcbeb6a8dbe93e3ffa50393b24e1675808886f4d374e26d31352013412b
Contents?: true
Size: 632 Bytes
Versions: 1
Compression:
Stored size: 632 Bytes
Contents
# frozen_string_literal: true module Decidim # A moderation belongs to a reportable and includes many reports class Moderation < ApplicationRecord belongs_to :reportable, foreign_key: "decidim_reportable_id", foreign_type: "decidim_reportable_type", polymorphic: true belongs_to :participatory_process, foreign_key: "decidim_participatory_process_id", class_name: "Decidim::ParticipatoryProcess" has_many :reports, foreign_key: "decidim_moderation_id", class_name: "Decidim::Report" validates :reportable, :participatory_process, presence: true delegate :feature, :organization, to: :reportable end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-core-0.2.0 | app/models/decidim/moderation.rb |