Closed robincwillis closed 11 years ago
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.
Thanks!
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.