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.26.8 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.4 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.3 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.7 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.5 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.2 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.1 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.4 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.0 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.3 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.0.rc2 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.27.0.rc1 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.2 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.1 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.0 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.0.rc2 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.26.0.rc1 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.25.2 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.25.1 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb
decidim-proposals-0.25.0 app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb