Class: Helena::Questions::CheckboxGroup
- Inherits:
-
Helena::Question
- Object
- Helena::Question
- Helena::Questions::CheckboxGroup
- Includes:
- Concerns::Questions::Requirable
- Defined in:
- app/models/helena/questions/checkbox_group.rb
Constant Summary
Constants inherited from Helena::Question
Instance Method Summary collapse
Methods inherited from Helena::Question
Instance Method Details
#includes_subquestions? ⇒ Boolean
6 7 8 |
# File 'app/models/helena/questions/checkbox_group.rb', line 6 def includes_subquestions? true end |
#validate_answers_in(answers) ⇒ Object
10 11 12 13 14 |
# File 'app/models/helena/questions/checkbox_group.rb', line 10 def validate_answers_in(answers) errors = {} errors[code] = :blank if sub_questions.map { |sub_question| answers[sub_question.code].zero? }.all? && required errors end |