This project is archived and is in readonly mode.

#6420 ✓committed
Tom Stuart

button_tag has the wrong default type and doesn't accept a block

Reported by Tom Stuart | February 12th, 2011 @ 12:46 PM | in 3.1

The main reason for using <button> (instead of <input type="submit"> et al) is to make a button with content that is formatted, or different from the button's value, or both. The current version of button_tag doesn't support this very well, because it defaults type to "button" and doesn't let you pass a block.

Attached are patches for both of these issues; alternatively, there's a pull request.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages