def button_to(name, options = {}, html_options = nil)
html_options = (html_options || {}).stringify_keys
convert_boolean_attributes!(html_options, %w( disabled ))
convert_confirm_option_to_javascript!(html_options)
url, name = options.is_a?(String) ?
[ options, name || options ] :
[ url_for(options), name || url_for(options) ]
html_options.merge!("type" => "submit", "value" => name)
"<form method=\"post\" action=\"#{h url}\" class=\"button-to\"><div>" +
tag("input", html_options) + "</div></form>"
end