$('#modal-dialogs').html('<%= j render("modal", {user: @user}) %>'); $('#edit-user-modal').modal('show'); $('.remote-form').enableValidations();