Skip to content
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ace4f87
Rename div_class to make refactoring more obvious.
lcreid Jul 20, 2018
88ff292
Fix issue #476 for check_boxes.
lcreid Jul 20, 2018
b4d4039
Fix issue #476 for radio buttons.
lcreid Jul 20, 2018
507e931
Test for `:custom` option just once.
lcreid Jul 20, 2018
dc294aa
Merge branch 'master' into TomK32-patch-1
lcreid Sep 13, 2018
22df6db
Merge remote-tracking branch 'upstream/master'
lcreid Sep 13, 2018
476bc9c
Fix a Minitest deprecation warning.
lcreid Oct 27, 2018
90bcea8
Preparing v4.0.0.
lcreid Oct 27, 2018
d0c7f53
Merge remote-tracking branch 'upstream/master'
lcreid Nov 1, 2018
9e9a194
Add Code of Conduct.
lcreid Nov 2, 2018
5073605
Merge remote-tracking branch 'upstream/master'
lcreid Nov 3, 2018
1b6c06b
Documentation corrections for RuboCop.
lcreid Nov 3, 2018
51b0701
Merge remote-tracking branch 'upstream/master'
lcreid Nov 3, 2018
d42f2e1
Merge remote-tracking branch 'upstream/master'
lcreid Nov 7, 2018
e7a3530
Explicitly disable RuboCop on FormBuilder class and form_group_builder.
lcreid Nov 7, 2018
3e25116
Merge remote-tracking branch 'upstream/master'
lcreid Dec 19, 2018
4cc3ce6
Merge remote-tracking branch 'upstream/master'
lcreid Jan 7, 2019
3ba7585
Merge remote-tracking branch 'upstream/master'
lcreid Jan 10, 2019
66cb2b5
Fix Rubocop offense in test.
lcreid Jan 10, 2019
1121d86
Documentation for wrapper: false.
lcreid Jan 10, 2019
3114e3b
Move the CHANGELOG entry for #259 to the right place.
lcreid Jan 10, 2019
17aa8f7
Add a test to confirm the placement of HTML options in select in README.
lcreid Jan 10, 2019
8e3913f
Merge remote-tracking branch 'upstream/master' into 495-select-example
lcreid Jan 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/bootstrap_selects_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -677,4 +677,24 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
assert_equivalent_xml expected, @builder.datetime_select(:misc, { include_blank: true }, class: "my-datetime-select")
end
end

test "confirm documentation example for HTML options" do
expected = <<-HTML.strip_heredoc
<div class="form-group has-warning" data-foo="bar">
<label for="user_misc">Choose your favorite fruit:</label>
<select class="form-control selectpicker" id="user_misc" name="user[misc]">
<option value="1">Apple</option>
<option value="2">Grape</option>
</select>
</div>
HTML
assert_equivalent_xml expected,
@builder.select(:misc,
[["Apple", 1], ["Grape", 2]],
{
label: "Choose your favorite fruit:",
wrapper: { class: "has-warning", data: { foo: "bar" } }
},
class: "selectpicker")
end
end