Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


f.button overrides default rails FormBuilder f.button? #449

rubylibre opened this Issue · 7 comments

3 participants


Am I correct?


Yeah. Are you with any issue? I think that we need to change it to work with Rails 3.2 too cc/ @carlosantoniodasilva


Not directly. I am playing with twitter bootstrap and for that to work, all form 'buttons' need to be buttons.
It has something to do with Firefox default line-height for input elements. (default value is: normal !important)

When using a input[type="submit"] next to a cancel link, both styled with bootstrap, you will see the difference (in Firefox).

BTW thank you for simple_form!


Thank you to report this. I'll work to do the f.button use the Rails 3.2 helper. Thanks


Yeah, I think I've already got into that, when using input[submit] and a reset button. I've changed the reset to be input[type=reset] at that time, which worked fine.

The issue is that Rails uses f.button to create a button, and f.submit a input type=submit. SimpleForm uses f.button to delegate to Rails' submit which will create a input type=submit. Not sure how to handle that yet, but we'll check. Thanks.


Hi Carlos,

That is it. In much better words than mine :)
Most of the time no reset is used (actually never) but a cancel link styled as a button...

@carlosantoniodasilva carlosantoniodasilva closed this issue from a commit
@carlosantoniodasilva carlosantoniodasilva Allow using Rails button helper with f.button :button. Closes #449
Make sure to just alias button when it is available, to avoid errors
with Rails versions prior to 3.2.

Hey @rubylibre, please give it a try and let us know about any issue. Thanks.


Hi the code works like a charm, thanks!

( Seems that bootstraps button isn't that consistently styled. The button and link have different vertical alignment when styled as button. )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.