skill-assessment-app/app/views/quiz/_text.html.erb
2016-08-08 17:08:20 -05:00

12 lines
406 B
Plaintext

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