$("#<%= dom_id @writing_seminar_category %>").replaceWith("<%= j render :partial => 'writing_seminar_category', :collection => [@writing_seminar_category] %>");
<% @writing_seminar_category = @types.new(:display => 'List') # reset for new form %>
$("#form_writing_seminar_category").replaceWith("<%= j render "form" %>")
$("#form_writing_seminar_category")[0].reset();