Class: Helena::Questions::RadioMatrix
- Inherits:
-
Helena::Question
- Object
- Helena::Question
- Helena::Questions::RadioMatrix
- Defined in:
- app/models/helena/questions/radio_matrix.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Helena::Question
Instance Method Summary collapse
- #includes_labels? ⇒ Boolean
- #includes_subquestions? ⇒ Boolean
- #validate_answers_in(answers) ⇒ Object
Instance Method Details
#includes_labels? ⇒ Boolean
7 8 9 |
# File 'app/models/helena/questions/radio_matrix.rb', line 7 def includes_labels? true end |
#includes_subquestions? ⇒ Boolean
11 12 13 |
# File 'app/models/helena/questions/radio_matrix.rb', line 11 def includes_subquestions? true end |
#validate_answers_in(answers) ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/models/helena/questions/radio_matrix.rb', line 15 def validate_answers_in(answers) errors = {} sub_questions.each do |sub_question| errors[sub_question.code] = :blank if answers[sub_question.code].blank? && required end errors end |