Railsでbutton_to_remoteがないときは

以下のメソッドを、application_helper.rb にでも追加しておく

def button_to_function(name, function, html_options = {})
html_options.symbolize_keys!
tag(:input, html_options.merge({
:type => "button", :value => name,
:onclick => (html_options[:onclick] ? "#{html_options[:onclick]}; " : "") + "#{function};"
}))
end

def button_to_remote(name, options = {}, html_options = {})
button_to_function(name, remote_function(options), html_options)
end

def button_to(name, url, html_options = {})
button_to_function(name, "window.location='" + url_for(url) + "';", html_options)
end