Class: Decidim::Proposals::ProposalWizardCreateStepForm

Inherits:
Form
  • Object
show all
Defined in:
decidim-proposals/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb

Overview

A form object to be used when public users want to create a proposal.

Direct Known Subclasses

ProposalForm

Instance Method Summary collapse

Instance Method Details

#map_model(model) ⇒ Object


25
26
27
28
29
30
# File 'decidim-proposals/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb', line 25

def map_model(model)
  self.user_group_id = model.user_groups.first&.id
  return unless model.categorization

  self.category_id = model.categorization.decidim_category_id
end