Sha256: bbac24da57f989ff667403b435e7ea025e945ea4bb9436415bd5b51c1bc49df9

Contents?: true

Size: 562 Bytes

Versions: 5

Compression:

Stored size: 562 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Proposals
    module Admin
      # A form object to be used when admin users want to review a collection of proposals
      # from a participatory text.
      class PreviewParticipatoryTextForm < Decidim::Form
        attribute :proposals, Array[ProposalForm]

        def from_models(proposals)
          self.proposals = proposals.collect do |proposal|
            ProposalForm.from_model(proposal)
          end
        end

        def proposals_attributes=(attributes); end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-proposals-0.16.1 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.16.0 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.15.2 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.15.1 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.15.0 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb