Sha256: a3e40cfe29068efe6bb8e77e91ca6ad062333202304a4b4d653ca0a0873cd57f

Contents?: true

Size: 654 Bytes

Versions: 6

Compression:

Stored size: 654 Bytes

Contents

# frozen_string_literal: true

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

        def from_models(paragraphs)
          self.paragraphs = paragraphs.collect do |paragraph|
            Admin::ParticipatoryTextParagraphForm.from_model(paragraph)
          end
        end

        def paragraphs_attributes=(attributes); end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-enhanced_textwork-1.0.5 app/forms/decidim/enhanced_textwork/admin/preview_participatory_text_form.rb
decidim-enhanced_textwork-1.0.4 app/forms/decidim/enhanced_textwork/admin/preview_participatory_text_form.rb
decidim-enhanced_textwork-1.0.3 app/forms/decidim/enhanced_textwork/admin/preview_participatory_text_form.rb
decidim-enhanced_textwork-1.0.2 app/forms/decidim/enhanced_textwork/admin/preview_participatory_text_form.rb
decidim-enhanced_textwork-1.0.1 app/forms/decidim/enhanced_textwork/admin/preview_participatory_text_form.rb
decidim-enhanced_textwork-1.0.0 app/forms/decidim/enhanced_textwork/admin/preview_participatory_text_form.rb