Skip to content

Commit 721f303

Browse files
r-sierraJohn Yeates
authored and
John Yeates
committed
Additional Form Group Attributes in select example (bootstrap-ruby#352)
* Additional Form Group Attributes in select example Show how to set additional Form Group Attributes like wrapper class * Update README.md Missing "}"
1 parent 76c5027 commit 721f303

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ You still can use `wrapper_class` option to set only a css class. This is just a
279279
Our select helper accepts the same arguments as the [default Rails helper](http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-select). Here's an example of how you pass both options and html_options hashes:
280280

281281
```erb
282-
<%= f.select :product, [["Apple", 1], ["Grape", 2]], { label: "Choose your favorite fruit:" }, { class: "selectpicker" } %>
282+
<%= f.select :product, [["Apple", 1], ["Grape", 2]], { label: "Choose your favorite fruit:" }, { class: "selectpicker", wrapper: { class: 'has-warning', data: { foo: 'bar' } } } %>
283283
```
284284

285285
### Checkboxes and Radios

0 commit comments

Comments
 (0)