<% option_id = "#{question.question_id}_finish-later" checkbox_html = {class: 'checkbox', id: "answer_#{option_id}", name: "answer[#{question.input_type}][later]", checked: Array(question.answer).include?('finish-later') } answers = answer.try(:answer) || answer %> <%= render partial: "quiz/answer_errors", locals: {question: question, answer: answer} %>