From 5189ddeffa963eb45aa32a4ca5aa090297c80284 Mon Sep 17 00:00:00 2001 From: r-sierra Date: Mon, 30 Oct 2017 16:00:18 -0300 Subject: [PATCH 1/2] Additional Form Group Attributes in select example Show how to set additional Form Group Attributes like wrapper class --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c1404a130..d6a1eed1c 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ You still can use `wrapper_class` option to set only a css class. This is just a 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: ```erb -<%= f.select :product, [[1, "Apple"], [2, "Grape"]], { label: "Choose your favorite fruit:" }, { class: "selectpicker" } %> +<%= f.select :product, [[1, "Apple"], [2, "Grape"]], { label: "Choose your favorite fruit:" }, { class: "selectpicker", wrapper: { class: 'has-warning', data: { foo: 'bar' } } %> ``` ### Checkboxes and Radios From 313f15ec25ef78c0b6bd889620950dedeb5adf98 Mon Sep 17 00:00:00 2001 From: r-sierra Date: Wed, 10 Jan 2018 23:53:28 +1300 Subject: [PATCH 2/2] Update README.md Missing "}" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 815e8a01a..6dcd8dd4b 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,7 @@ You still can use `wrapper_class` option to set only a css class. This is just a 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: ```erb -<%= f.select :product, [["Apple", 1], ["Grape", 2]], { label: "Choose your favorite fruit:" }, { class: "selectpicker", wrapper: { class: 'has-warning', data: { foo: 'bar' } } %> +<%= f.select :product, [["Apple", 1], ["Grape", 2]], { label: "Choose your favorite fruit:" }, { class: "selectpicker", wrapper: { class: 'has-warning', data: { foo: 'bar' } } } %> ``` ### Checkboxes and Radios