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