<%= form_for [@question, @question.answers.build] do |f| %>
  <fieldset id="form" class="container">
    <div id="input-options">
      <%= f.text_area :content %>
      <%= f.hidden_field :question_id %>
      <% if logged_in? %>
      <%= f.hidden_field :user_id, :value => current_user.id %>
      <% end %>
    </div>
    <%= f.submit 'Post Answer' %>
  </fieldset>
<% end %>

<%= form_for [@question, @question.answers.build] do |f| %>
  <fieldset id="form" class="container">
    <div id="input-options">
      <%= f.text_area :content %>
      <%= f.hidden_field :question_id %>
      <% if logged_in? %>
      <%= f.hidden_field :user_id, :value => current_user.id %>
      <% end %>
    </div>
    <%= f.submit 'Post Answer' %>
  </fieldset>
<% end %>

<% if @errors %>
  <% @errors.each do |msg| %>
    <p><%= msg %></p>
  <% end %>
<% end %>
Add error handling for non-ajax requests to post answer
Add error handling for non-ajax requests to post answer 