How to add confirm message with link_to Ruby on rails

后端 未结 10 1738
[愿得一人]
[愿得一人] 2020-12-29 17:45

I wanted to add confirmation message on link_to function with Ruby.

= link_to \'Reset message\', :action=>\'reset\' ,:confirm=>\'Are you sure?\'
         


        
10条回答
  •  感动是毒
    2020-12-29 18:25

    Somehow does not work those code only Safari browser So I was involved button...

    <%= button_to('', delete_path(), method: "delete", data: { confirm: 'Are you sure?', disable_with: 'loading...' }) %>
    

提交回复
热议问题