Sha256: a8b3a0adbe937a6eeb6a42e76a2697c19f9e800d47c2113157437bf1b41b0b3d

Contents?: true

Size: 589 Bytes

Versions: 10

Compression:

Stored size: 589 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[Decidim::Proposals::Admin::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

10 entries across 10 versions & 1 rubygems

Version Path
decidim-proposals-0.21.0 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.20.1 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.20.0 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.19.1 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.18.1 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.19.0 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.17.2 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.18.0 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.17.1 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb
decidim-proposals-0.17.0 app/forms/decidim/proposals/admin/preview_participatory_text_form.rb