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