Class: Decidim::Surveys::Admin::SurveyQuestionForm

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#number_of_optionsObject



29
30
31
# File 'app/forms/decidim/surveys/admin/survey_question_form.rb', line 29

def number_of_options
  answer_options.size
end

#to_paramObject



25
26
27
# File 'app/forms/decidim/surveys/admin/survey_question_form.rb', line 25

def to_param
  id || "survey-question-id"
end