Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #1218 from benlinton/update-readme-with-button-ele…
Browse files Browse the repository at this point in the history
…ment-example

Update README with a button element example [ci skip]
  • Loading branch information
nashby committed Mar 10, 2015
2 parents 749c926 + 574d101 commit ad83ff9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -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
Expand Down

0 comments on commit ad83ff9

Please sign in to comment.