$('#new-<%= @polymorphic_resource_name %>').html('<%= j render("form") %>').slide(); $('#new-<%= @polymorphic_resource_name %>-link').hide(); $('.remote-form').enableValidations(); load_states();