Class: Decidim::Proposals::ProposalWizardCreateStepForm

Inherits:
Form
  • Object
show all
Defined in:
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



20
21
22
23
24
25
# File 'app/forms/decidim/proposals/proposal_wizard_create_step_form.rb', line 20

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