Improve README button example code [ci skip]

This commit is contained in:
Benjamin Linton 2014-08-06 16:13:14 -05:00
parent ed3de1c2b5
commit f04a7687d1
1 changed files with 6 additions and 0 deletions

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 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
Say you wanted to use a rails form helper but still wrap it in **Simple Form** goodness? You can, by