Sha256: 819ef548927c7b0c124b0801e1f3cf3bf6afb982eac45309554602c684328415

Contents?: true

Size: 305 Bytes

Versions: 4

Compression:

Stored size: 305 Bytes

Contents

# frozen_string_literal: true
module Decidim
  # A form object to be used when public users want to report a reportable.
  class ReportForm < Decidim::Form
    mimic :report

    attribute :reason, String
    attribute :details, String

    validates :reason, inclusion: { in: Report::REASONS }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-core-0.1.0 app/forms/decidim/report_form.rb
decidim-core-0.0.8.1 app/forms/decidim/report_form.rb
decidim-core-0.0.7 app/forms/decidim/report_form.rb
decidim-core-0.0.6 app/forms/decidim/report_form.rb