$("[data-toggle=tooltip]").tooltip("dispose"); <% # Remove the modal if it already exists %> $("#new_video_release_confirmation_modal").remove(); <% # Create and show the modal %> $("body").append("<%= j render('new_video_release_confirmation_modal', video_release_confirmation: @video_release_confirmation) %>"); $("#new_video_release_confirmation_modal").modal("toggle");