Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [829de9d98e59f9b083ed96a9031cd9841c83ae47] by Tom Stuart

Revision 829de9d98e59f9b083ed96a9031cd9841c83ae47, committed by Tom Stuart · February 12th, 2011 @ 03:52 PM

Add block support to button_tag helper

As per the HTML 4.01 spec:

Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to "image", but the BUTTON element type allows content.

Since rich content is the main purpose of the element, it makes
sense for the button_tag helper to accept a block.

http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON
http://dev.w3.org/html5/spec/the-button-element.html#the-button-ele...

Signed-off-by: Santiago Pastorino and Emilio Tagua santiago+emilioe@wyeworks.com
https://github.com/rails/rails/commit/829de9d98e59f9b083ed96a9031cd...

2 changed files

  • M actionpack/lib/action_view/helpers/form_tag_helper.rb
  • M actionpack/test/template/form_tag_helper_test.rb