rails/rails — pull request #3933 by wfarr (2011-12-11 05:02:53+00:00)
Title: Add button_tag support to ActionView::Helpers::FormBuilder

Working on a project I attempted to use a button inside of a form builder and noticed that `ActionView::Helpers::FormBuilder` lacks support for generating `button_tag` though it covers most everything else.

This pull request adds support for generating `button_tag` inside of form builders, and the default behavior mirrors that of the existing `submit_tag` support.

Example:

<%= form_for @post do |f| %>
<%= f.button %>
<% end %>

Generates HTML like:

Create post