skill-assessment-app/app/views/quiz/_text.html.erb
2016-08-10 09:03:25 -05:00

11 lines
388 B
Plaintext

<%
answers = answer.try(:answer) || answer
%>
<label for="answer_text">Enter answer here</label>
<%= text_area_tag 'answer[text]', answers, {rows: 10, data: { last: answers } } %>
<div class="chars <%= params[:action] == 'summary' ? 'hidden' : '' %>">Characters remaining: <span></span></div>
<%= render partial: "quiz/answer_errors", locals: {question: question, answer: answer} %>