Skip to content

Commit ff7ad3a

Browse files
authored
Preparing v4.0.0. (bootstrap-ruby#490)
* Rename div_class to make refactoring more obvious. * Fix issue bootstrap-ruby#476 for check_boxes. * Fix issue bootstrap-ruby#476 for radio buttons. * Test for `:custom` option just once. * Fix a Minitest deprecation warning. * Preparing v4.0.0.
1 parent 67f35a8 commit ff7ad3a

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

CHANGELOG.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,34 @@
66

77
### New features
88

9+
* Your contribution here!
10+
11+
### Bugfixes
12+
13+
* Your contribution here!
14+
15+
## [4.0.0][] (2018-10-27)
16+
17+
🚨 **This release adds support for Bootstrap v4 and drops support for Bootstrap v3.** 🚨
18+
19+
If your app uses Bootstrap v3, you should continue using bootstrap_form 2.7.x instead.
20+
21+
Bootstrap v3 and v4 are very different, and thus bootstrap_form now produces different markup in order to target v4. The changes are too many to list here; you can refer to Bootstrap's [Migrating to v4](https://getbootstrap.com/docs/4.0/migration/) page for a detailed explanation.
22+
23+
In addition to these necessary markup changes, the bootstrap_form API itself has the following important changes in this release.
24+
25+
### Breaking changes
26+
27+
* See [Migrating to v4](https://getbootstrap.com/docs/4.0/migration/).
28+
29+
### New features
30+
931
* [#476] Give a way to pass classes to the `div.form-check` wrapper for check boxes and radio buttons - [@lcreid](https://github.com/lcreid).
1032
* [461](https://github.com/bootstrap-ruby/bootstrap_form/pull/461): default form-inline class applied to parent content div on date select helpers. Can override with a :skip_inline option on the field helper - [@lancecarlson](https://github.com/lancecarlson).
11-
* Your contribution here!
1233
* The `button`, `submit`, and `primary` helpers can now receive an additional option, `extra_class`. This option allows us to specify additional CSS classes to be added to the corresponding button/input, _while_ maintaining the original default ones. E.g., a primary button with an `extra_class` 'test-button' will have its final CSS classes declaration as 'btn btn-primary test-button'.
1334

1435
### Bugfixes
1536

16-
* Your contribution here!
1737
* [#347](https://github.com/bootstrap-ruby/bootstrap_form/issues/347) Fix `wrapper_class` and `wrapper` options for helpers that have `html_options`.
1838
* [#472](https://github.com/bootstrap-ruby/bootstrap_form/pull/472) Use `id` option value as `for` attribute of label for custom checkboxes and radio buttons.
1939
* [#478](https://github.com/bootstrap-ruby/bootstrap_form/issues/478) Fix offset for form group without label when multiple label widths are specified.
@@ -223,7 +243,8 @@ Features:
223243
- Added support for bootstrap_form_tag (@baldwindavid)
224244

225245

226-
[Pending Release]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.0.0.alpha1...HEAD
246+
[Pending Release]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.0.0...HEAD
247+
[4.0.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.0.0.alpha1...v4.0.0
227248
[4.0.0.alpha1]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.7.0...v4.0.0.alpha1
228249
[2.7.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.6.0...v2.7.0
229250
[2.6.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.5.3...v2.6.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Bootstrap v4-style forms into your Rails application.
2121
Add it to your Gemfile:
2222

2323
```ruby
24-
gem "bootstrap_form", ">= 4.0.0.alpha1"
24+
gem "bootstrap_form", ">= 4.0.0"
2525
```
2626

2727
Then:

lib/bootstrap_form/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module BootstrapForm
2-
VERSION = "4.0.0.alpha1".freeze
2+
VERSION = "4.0.0".freeze
33
end

test/bootstrap_form_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ class BootstrapFormTest < ActionView::TestCase
576576
@user.terms = true
577577
assert @user.valid?
578578

579-
assert_equal nil, @builder.error_summary
579+
assert_nil @builder.error_summary
580580
end
581581

582582
test 'errors_on renders the errors for a specific attribute when invalid' do

0 commit comments

Comments
 (0)