1
0
Fork 0
mirror of https://github.com/heartcombo/simple_form.git synced 2022-11-09 12:19:26 -05:00

Merge pull request #1115 from benlinton/update-readme-button-example

Update README button example code [ci skip]
This commit is contained in:
Carlos Antonio da Silva 2014-08-06 19:10:01 -03:00
commit c3bc4af79d

View file

@ -429,6 +429,12 @@ All web forms need buttons, right? **Simple Form** wraps them in the DSL, acting
The above will simply call submit. You choose to use it or not, it's just a question of taste. The above will simply call submit. You choose to use it or not, it's just a question of taste.
The button method also accepts optional parameters, that are delegated to the underlying submit call:
```erb
<%= f.button :submit, "Custom Button Text", class: "my-button" %>
```
### Wrapping Rails Form Helpers ### Wrapping Rails Form Helpers
Say you wanted to use a rails form helper but still wrap it in **Simple Form** goodness? You can, by Say you wanted to use a rails form helper but still wrap it in **Simple Form** goodness? You can, by