.radio_group.form-group{ class: "#{'has-error' if errors[question.code]}" } %label != question.question_text = ' *' if question.required - question.labels.each do |label| .radio %label - checked = (answers[question.code].to_s == label.value.to_s) || label.preselected = form.simple_fields_for :answers do |answer_form| = answer_form.radio_button question.code, label.value, checked: checked = label.text - if errors[question.code] .help-block.text-danger= errors[question.code]