Update README with a button element example

This commit is contained in:
Benjamin Linton 2015-03-09 16:12:58 -05:00
parent 749c926140
commit 574d101a73
1 changed files with 10 additions and 0 deletions

View File

@ -435,6 +435,16 @@ The button method also accepts optional parameters, that are delegated to the un
<%= f.button :submit, "Custom Button Text", class: "my-button" %>
```
To create a `<button>` element, use the following syntax:
```erb
<%= f.button :button, "Custom Button Text" %>
<%= f.button :button do %>
Custom Button Text
<% end %>
```
### Wrapping Rails Form Helpers
Say you wanted to use a rails form helper but still wrap it in **Simple Form** goodness? You can, by