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
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