Class: Decidim::Meetings::Admin::QuestionForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Meetings::Admin::QuestionForm
- Includes:
- TranslatableAttributes
- Defined in:
- app/forms/decidim/meetings/admin/question_form.rb
Overview
This class holds a Form to update questionnaire questions from Decidim’s admin panel.
Instance Method Summary collapse
Instance Method Details
#editable? ⇒ Boolean
32 33 34 |
# File 'app/forms/decidim/meetings/admin/question_form.rb', line 32 def editable? @editable ||= id.blank? || Decidim::Meetings::Question.unpublished.unanswered.exists?(id:) end |
#number_of_options ⇒ Object
36 37 38 |
# File 'app/forms/decidim/meetings/admin/question_form.rb', line 36 def .size end |
#to_param ⇒ Object
26 27 28 29 30 |
# File 'app/forms/decidim/meetings/admin/question_form.rb', line 26 def to_param return id if id.present? "questionnaire-question-id" end |