Sha256: c463064e8421932fe197249cf07d9ba5019e86231264eb468be0b046857ef2af

Contents?: true

Size: 538 Bytes

Versions: 4

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true
module Decidim
  module Admin
    # A form object used to create attachments in a participatory process.
    #
    class ParticipatoryProcessAttachmentForm < Form
      include TranslatableAttributes

      attribute :file
      translatable_attribute :title, String
      translatable_attribute :description, String

      mimic :participatory_process_attachment

      validates :file, presence: true, unless: :persisted?
      validates :title, :description, translatable_presence: true
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
decidim-admin-0.0.2 app/forms/decidim/admin/participatory_process_attachment_form.rb
decidim-0.0.2 decidim-admin/app/forms/decidim/admin/participatory_process_attachment_form.rb
decidim-admin-0.0.1 app/forms/decidim/admin/participatory_process_attachment_form.rb
decidim-0.0.1 decidim-admin/app/forms/decidim/admin/participatory_process_attachment_form.rb