Sha256: d0d2e2f1bd23af4fb0ddbb9cfa2f67d34d96d242c9abd870f2416c125b631ad8

Contents?: true

Size: 306 Bytes

Versions: 122

Compression:

Stored size: 306 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

122 entries across 122 versions & 2 rubygems

Version Path
decidim-0.6.4 decidim-core/app/forms/decidim/report_form.rb
decidim-core-0.6.3 app/forms/decidim/report_form.rb
decidim-0.6.3 decidim-core/app/forms/decidim/report_form.rb
decidim-core-0.6.2 app/forms/decidim/report_form.rb
decidim-0.6.2 decidim-core/app/forms/decidim/report_form.rb
decidim-core-0.6.1 app/forms/decidim/report_form.rb
decidim-0.6.1 decidim-core/app/forms/decidim/report_form.rb
decidim-core-0.6.0 app/forms/decidim/report_form.rb
decidim-0.6.0 decidim-core/app/forms/decidim/report_form.rb
decidim-core-0.5.1 app/forms/decidim/report_form.rb
decidim-0.5.1 decidim-core/app/forms/decidim/report_form.rb
decidim-core-0.5.0 app/forms/decidim/report_form.rb
decidim-0.5.0 decidim-core/app/forms/decidim/report_form.rb
decidim-core-0.4.4 app/forms/decidim/report_form.rb
decidim-core-0.4.2 app/forms/decidim/report_form.rb
decidim-core-0.4.1 app/forms/decidim/report_form.rb
decidim-core-0.4.3 app/forms/decidim/report_form.rb
decidim-core-0.4.0 app/forms/decidim/report_form.rb
decidim-core-0.3.2 app/forms/decidim/report_form.rb
decidim-core-0.3.1 app/forms/decidim/report_form.rb