ifad/data-confirm-modal — pull request #2 by robincwillis (2013-07-07 23:35:56+00:00)
Title: check if link remote is true and dismiss modal on confirm

If someone is calling the modal from a link using an ajax helper like

<%= link_to "Delete post", @post, remote: true, method: :delete %>

it is important to dismiss the modal even if the confirm button is pressed. This small change checks for the presence of "remote: true" in the element and if found adds the 'data-dismiss' attribute to the confirm button of the modal.