app/models/helena/question_group.rb in helena-1.3.1 vs app/models/helena/question_group.rb in helena-2.0.0

- old
+ new

@@ -13,7 +13,15 @@ field :allow_to_go_back, type: Boolean def question_codes questions.map { |question| [question.code] + question.sub_questions.map(&:code) }.flatten end + + def question_texts + questions.map { |question| [question.code, question.question_text] + subquestion_texts(question) }.flatten + end + + def subquestion_texts(question) + question.sub_questions.map { |sub_question| [sub_question.code, sub_question.text] } + end end end