<% if @question.errors.any? %>

<%= pluralize(@question.errors.count, "error") %> prohibited this question from being saved:

<% 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.submit %>