# File lib/action_view/helpers/javascript_helper.rb, line 113 def button_to_function(name, *args, &block) html_options = args.last.is_a?(Hash) ? args.pop : {} function = args[0] || '' html_options.symbolize_keys! function = update_page(&block) if block_given? tag(:input, html_options.merge({ :type => "button", :value => name, :onclick => (html_options[:onclick] ? "#{html_options[:onclick]}; " : "") + "#{function};" })) end