So let\'s say I have Posts and Comments and the url for show is /posts/1/comments/1. I want to create a link to delete that comment in the comments controller d
/posts/1/comments/1
Since some time ago, the confirm option has to be included in a data hash, otherwise it will be silently ignored:
confirm
data
<%= link_to 'Destroy', post_comment_path(@post, comment), data: { confirm: 'Are you sure?' }, method: :delete %>