Sha256: 5d4c82eaef494e9cdf2800de93103769ab3bd7d0dcfbbd0ee20b0c47544093b6

Contents?: true

Size: 581 Bytes

Versions: 58

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Proposals
    module Admin
      # A form object to be used when admin users want to create a proposal
      # through the participatory texts.
      class ParticipatoryTextProposalForm < Admin::ProposalBaseForm
        attribute :title, String
        attribute :body, String
        validates :title, length: { maximum: 150 }, presence: true

        def map_model(model)
          self.title = translated_attribute(model.title)
          self.body = translated_attribute(model.body)
        end
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
decidim-proposals-0.29.1 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.28.4 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.9 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.29.0 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.28.3 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.8 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.29.0.rc4 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.29.0.rc3 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.29.0.rc2 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.29.0.rc1 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.28.2 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.7 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.28.1 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.6 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.10 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.9 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.28.0 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.5 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.28.0.rc5 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.28.0.rc4 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb