% if @question.errors.any? %>
<%= pluralize(@question.errors.count, "error") %> prohibited this question from being saved:
<% @question.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
<%= f.label :details %>
<%= f.text_area :details %>
<%= f.label :position %>
<%= f.number_field :position %>
<%= f.label :questionnaire_id %>
<%= f.select :questionnaire_id, questionnaire_options, :include_blank => true %>
<%= f.fields_for :answers do |answer_fields| %>
<%= render :partial => 'answer', :locals => { :f => answer_fields } %>
<% end %>
<%= link_to "New Answer", '#add_answer', :class => 'add_association', 'data-association' => "answers" %>
<%= f.fields_for :answers, Answer.new, :child_index => "new_answers" do |a_f|%>
<%= render :partial => 'answer', :locals => { :f => a_f } %>
<% end %>
<%= f.submit %>