Class: Decidim::Proposals::Admin::ParticipatoryTextProposalForm

Inherits:
ProposalBaseForm show all
Defined in:
decidim-proposals/app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb

Overview

A form object to be used when admin users want to create a proposal through the participatory texts.

Constant Summary

Constants included from AttributeObject::TypeMap

AttributeObject::TypeMap::Boolean, AttributeObject::TypeMap::Decimal

Instance Attribute Summary

Attributes inherited from AttributeObject::Form

#context

Instance Method Summary collapse

Methods inherited from ProposalBaseForm

#author, #category, #component_automatic_hashtags, #component_suggested_hashtags, #extra_hashtags, #geocoded?, #geocoding_enabled?, #has_address?, #meeting_as_author, #meetings, #scope, #scope_id, #suggested_hashtag_checked?, #suggested_hashtags

Methods included from TranslatableAttributes

#default_locale?

Methods inherited from AttributeObject::Form

ensure_hash, from_model, from_params, hash_from, infer_model_name, mimic, mimicked_model_name, model_name, #persisted?, #to_key, #to_model, #to_param, #valid?, #with_context

Methods included from AttributeObject::Model

#[], #[]=, #attributes, #attributes_with_values, #initialize, #to_h

Instance Method Details

#map_model(model) ⇒ Object


13
14
15
16
# File 'decidim-proposals/app/forms/decidim/proposals/admin/participatory_text_proposal_form.rb', line 13

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