Class: Decidim::Forms::Admin::QuestionnaireForm

Inherits:
Decidim::Form
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
decidim-forms/app/forms/decidim/forms/admin/questionnaire_form.rb

Overview

This class holds a Form to update questionnaires from Decidim's admin panel.

Instance Method Summary collapse

Methods included from TranslatableAttributes

#default_locale?

Instance Method Details

#map_model(model) ⇒ Object


19
20
21
22
23
# File 'decidim-forms/app/forms/decidim/forms/admin/questionnaire_form.rb', line 19

def map_model(model)
  self.questions = model.questions.map do |question|
    QuestionForm.from_model(question)
  end
end