<% hidden = params[:action] == 'summary' ? 'hidden' : '' answers = answer.try(:answer) || answer %> <%= render partial: "quiz/answer_errors", locals: {question: question, answer: answer} %>