Class: Decidim::Surveys::SurveyAnswerForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Surveys::SurveyAnswerForm
- Defined in:
- decidim-surveys/app/forms/decidim/surveys/survey_answer_form.rb
Overview
This class holds a Form to update survey unswers from Decidim’s public page
Instance Method Summary collapse
-
#map_model(model) ⇒ Object
Public: Map the correct fields.
- #question ⇒ Object
Instance Method Details
#map_model(model) ⇒ Object
Public: Map the correct fields.
Returns nothing.
20 21 22 |
# File 'decidim-surveys/app/forms/decidim/surveys/survey_answer_form.rb', line 20 def map_model(model) self.question_id = model.id end |
#question ⇒ Object
13 14 15 |
# File 'decidim-surveys/app/forms/decidim/surveys/survey_answer_form.rb', line 13 def question @question ||= survey.questions.find(question_id) end |