skill-assessment-app/app/views/quiz/_text.html.erb
2017-06-05 11:30:34 -05:00

9 lines
425 B
Plaintext

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