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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -