Sha256: 8fa9274abeeb8b2a8011aff2f6bc6826a4ac6539e1e657281fcc064ecd96f42e

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ReportingProposals
    module Admin
      class ProposalPhotoForm < Decidim::Form
        include Decidim::AttachmentAttributes
        attribute :attachment, AttachmentForm
        attachments_attribute :photos

        validates :add_photos, presence: true

        def current_component
          @current_component ||= context&.current_component
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-reporting_proposals-0.6.0 app/forms/decidim/reporting_proposals/admin/proposal_photo_form.rb