sweet-alert2-rails
sweet-alert2-rails copied to clipboard
Add support for button_to
Current sweet alert is not triggered when a button_to tag is used. This should act in the same way a link_to
or submit_tag
works but the module doesn't define a function for button_to
, only button_tag
.
E.G.
<%= button_to "Click Me", root_path, data: { confirm: "Do it?" }, class: "ui button" %>
see #9