Sha256: 59c25eda88f6e2e21d7bf43af381c979e034dc15d7a3fc4cdcf6cdfb71d5cf44

Contents?: true

Size: 585 Bytes

Versions: 23

Compression:

Stored size: 585 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_space, foreign_key: "decidim_participatory_space_id", foreign_type: "decidim_participatory_space_type", polymorphic: true
    has_many :reports, foreign_key: "decidim_moderation_id", class_name: "Decidim::Report"

    delegate :feature, :organization, to: :reportable
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
decidim-core-0.7.4 app/models/decidim/moderation.rb
decidim-core-0.7.3 app/models/decidim/moderation.rb
decidim-core-0.7.2 app/models/decidim/moderation.rb
decidim-core-0.7.1 app/models/decidim/moderation.rb
decidim-core-0.7.0 app/models/decidim/moderation.rb
decidim-core-0.6.8 app/models/decidim/moderation.rb
decidim-0.6.8 decidim-core/app/models/decidim/moderation.rb
decidim-core-0.6.7 app/models/decidim/moderation.rb
decidim-0.6.7 decidim-core/app/models/decidim/moderation.rb
decidim-core-0.6.6 app/models/decidim/moderation.rb
decidim-0.6.6 decidim-core/app/models/decidim/moderation.rb
decidim-core-0.6.5 app/models/decidim/moderation.rb
decidim-0.6.5 decidim-core/app/models/decidim/moderation.rb
decidim-core-0.6.4 app/models/decidim/moderation.rb
decidim-0.6.4 decidim-core/app/models/decidim/moderation.rb
decidim-core-0.6.3 app/models/decidim/moderation.rb
decidim-0.6.3 decidim-core/app/models/decidim/moderation.rb
decidim-core-0.6.2 app/models/decidim/moderation.rb
decidim-0.6.2 decidim-core/app/models/decidim/moderation.rb
decidim-core-0.6.1 app/models/decidim/moderation.rb