simple_form is very powerful gem allowing to customize almost everything while rendering form elements. In this post we will add a new custom component to simple_form for better rendering of submit buttons.
Our aim is adding a new component to simple_form so we can write:
[codesyntax lang=”rails”]
= f.button :submit_cancel, ‘Save’
[/codesyntax]
that will render
which is suitable for bootstrap 3 in horizontal form.
The solution is presented on gist.github.com.