Class: Decidim::Surveys::Admin::SurveyForm

Inherits:
Form
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
app/forms/decidim/surveys/admin/survey_form.rb

Overview

This class holds a Form to update surveys from Decidim’s admin panel.

Instance Method Summary collapse

Instance Method Details

#map_model(model) ⇒ Object



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

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