link to - Rails 4 - link_to with confirm in Rails -
i'm trying customize dialog confirm link_to in rails 4. not understand why rides html "confirm", , should "data-confirm"!
i've tried number of ways, , generated "confirm", this:
<%= link_to 'delete', user, :method => :delete, :confirm => 'are sure?' %> <a confirm="are sure?" rel="nofollow" data-method="delete" href="/user/13">delete</a>
i followed tutorial: http://thelazylog.com/custom-dialog-for-data-confirm-in-rails/ , used example in tutorial, doesn't work
confirm has been deprecated in rails 4.
so use new syntax:
<%= link_to "title", "#", data: {confirm: "are sure!"} %>
Comments
Post a Comment