<% if @success %>
  window.location.replace("<%= www_ta_discussions_url %>");
<% else %>
  form = $("form.new_ta_discussion_form");
  errors = $.parseJSON("<%= j @errors %>");
  new ErrorDisplayer(form, errors);
  <% flash.discard %>
<% end %>
