Wondering if you could add support for button_tag elements. Not sure if this is 100% correct, but the code below worked for me. If you prefer, I can put in a pull request.
def button_tag(*args, &block)
html_options = args[block_given? ? 0 : 1] || {}
if options_has_confirm?(html_options)
html_options['data-sweet-alert-confirm'] = html_options.delete(:confirm) ||
html_options[:data].delete(:confirm)
end
super *args, &block
end
Wondering if you could add support for button_tag elements. Not sure if this is 100% correct, but the code below worked for me. If you prefer, I can put in a pull request.