simple_form 2.1.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of simple_form might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -51
- data/README.md +195 -161
- data/lib/generators/simple_form/install_generator.rb +4 -4
- data/lib/generators/simple_form/templates/README +2 -2
- data/lib/generators/simple_form/templates/config/initializers/simple_form.rb +16 -13
- data/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb +16 -16
- data/lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb +3 -3
- data/lib/simple_form/action_view_extensions/builder.rb +1 -320
- data/lib/simple_form/action_view_extensions/builder.rb.orig +247 -0
- data/lib/simple_form/action_view_extensions/form_helper.rb +2 -9
- data/lib/simple_form/components/errors.rb +1 -7
- data/lib/simple_form/components/hints.rb +2 -7
- data/lib/simple_form/components/html5.rb +5 -2
- data/lib/simple_form/components/labels.rb +4 -4
- data/lib/simple_form/components/maxlength.rb +1 -8
- data/lib/simple_form/components/pattern.rb +2 -2
- data/lib/simple_form/components.rb +1 -1
- data/lib/simple_form/error_notification.rb +2 -2
- data/lib/simple_form/form_builder.rb +154 -50
- data/lib/simple_form/form_builder.rb.orig +486 -0
- data/lib/simple_form/helpers.rb +1 -1
- data/lib/simple_form/inputs/base.rb +7 -10
- data/lib/simple_form/inputs/block_input.rb +1 -1
- data/lib/simple_form/inputs/boolean_input.rb +6 -5
- data/lib/simple_form/inputs/collection_input.rb +7 -7
- data/lib/simple_form/inputs/date_time_input.rb +1 -1
- data/lib/simple_form/inputs/numeric_input.rb +0 -6
- data/lib/simple_form/inputs/password_input.rb +0 -1
- data/lib/simple_form/inputs/string_input.rb +0 -1
- data/lib/simple_form/railtie.rb +7 -0
- data/lib/simple_form/tags.rb +62 -0
- data/lib/simple_form/version.rb +1 -1
- data/lib/simple_form/version.rb.orig +7 -0
- data/lib/simple_form/wrappers/builder.rb +5 -29
- data/lib/simple_form/wrappers/many.rb +1 -1
- data/lib/simple_form/wrappers/root.rb +1 -1
- data/lib/simple_form/wrappers.rb +1 -1
- data/lib/simple_form.rb +43 -47
- data/test/action_view_extensions/builder_test.rb +78 -99
- data/test/action_view_extensions/form_helper_test.rb +25 -16
- data/test/components/label_test.rb +46 -46
- data/test/form_builder/association_test.rb +47 -29
- data/test/form_builder/button_test.rb +4 -4
- data/test/form_builder/error_notification_test.rb +8 -8
- data/test/form_builder/error_test.rb +18 -65
- data/test/form_builder/general_test.rb +62 -63
- data/test/form_builder/hint_test.rb +23 -29
- data/test/form_builder/input_field_test.rb +29 -12
- data/test/form_builder/label_test.rb +7 -17
- data/test/form_builder/wrapper_test.rb +21 -21
- data/test/inputs/boolean_input_test.rb +24 -24
- data/test/inputs/collection_check_boxes_input_test.rb +66 -55
- data/test/inputs/collection_radio_buttons_input_test.rb +81 -79
- data/test/inputs/collection_select_input_test.rb +76 -51
- data/test/inputs/datetime_input_test.rb +17 -11
- data/test/inputs/disabled_test.rb +10 -10
- data/test/inputs/discovery_test.rb +4 -4
- data/test/inputs/file_input_test.rb +1 -1
- data/test/inputs/general_test.rb +28 -12
- data/test/inputs/grouped_collection_select_input_test.rb +33 -20
- data/test/inputs/hidden_input_test.rb +3 -2
- data/test/inputs/numeric_input_test.rb +3 -3
- data/test/inputs/priority_input_test.rb +9 -3
- data/test/inputs/readonly_test.rb +12 -12
- data/test/inputs/required_test.rb +5 -5
- data/test/inputs/string_input_test.rb +15 -25
- data/test/inputs/text_input_test.rb +1 -1
- data/test/support/misc_helpers.rb +46 -24
- data/test/support/mock_controller.rb +6 -6
- data/test/support/models.rb +77 -62
- data/test/test_helper.rb +17 -34
- metadata +39 -22
- data/lib/simple_form/core_ext/hash.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bda3ec212b0e4f1da3e765b704b417893098679
|
4
|
+
data.tar.gz: 81b0e670aae4612d40793b872f6fc553fd6d05ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e242bc383e74b99f508350376d007c18bd7aedb325632d2d3a8a28043275efa03a9c5b90e6d4a00cec68b53de6636bdb43b3a0af5a83160b8a8bad88919d6248
|
7
|
+
data.tar.gz: 70b1845d8a357e8e4ff85def7540d849a8fcd4d070a78e185f2c369da7a453b7def368309dc3339a5a5c2b2f8f47613db2be328ac0dbbb90c3fa74aef996f80a
|
data/CHANGELOG.md
CHANGED
@@ -1,57 +1,27 @@
|
|
1
|
-
##
|
1
|
+
## 3.0.0
|
2
|
+
|
3
|
+
### enhancements
|
4
|
+
* New `input_class` global config option to set a class to be generated in all inputs.
|
5
|
+
* Collection tags accept html attributes as the last element of collection [@nashby](https://github.com/nashby)
|
6
|
+
* Change default `:value_method` of collection tags from `:last` to `:second` [@nashby](https://github.com/nashby)
|
7
|
+
* Support `Proc` object in `:conditions` option of associations [@bradly](https://github.com/bradly)
|
8
|
+
* `input_field` supports `html5` component [@nashby](https://github.com/nashby)
|
9
|
+
* Make `field_error_proc` configurable [@dfens](https://github.com/dfens)
|
10
|
+
* Support to Rails 4.
|
11
|
+
* Removed deprecated methods.
|
12
|
+
* SimpleForm no longer sets the `size` attribute automatically and the `default_input_size` setting
|
13
|
+
is now deprecated.
|
14
|
+
* Support to aria-required attribute to required fields [@ckundo](https://github.com/ckundo)
|
2
15
|
|
3
16
|
### bug fix
|
4
|
-
*
|
5
|
-
|
6
|
-
|
17
|
+
* Make `DateTimeInput#label_target` method to work with string values in `I18n.t('date.order')` (default
|
18
|
+
behaviour in Rails 4)
|
19
|
+
Closes [#846](https://github.com/plataformatec/simple_form/issues/846) [@mjankowski](https://github.com/mjankowski)
|
7
20
|
* Add "checkbox" class to the label of boolean input when there is no `:label`
|
8
21
|
in `generate_additional_classes_for` config option [@nashby](https://github.com/nashby)
|
9
22
|
* Support models with digits in their names [@webgago](https://github.com/webgago)
|
23
|
+
* Remove deprecation warnings related to `Relation#all` from Rails 4.
|
24
|
+
* Form builder can be used outside the context of a controller [@jasonwebster](https://github.com/jasonwebster)
|
25
|
+
* Skip pattern attribute when using `validates_format_of` with `:without` option [@glebm](https://github.com/glebm)
|
10
26
|
|
11
|
-
|
12
|
-
|
13
|
-
### bug fix
|
14
|
-
* Fix XSS vulnerability on error components.
|
15
|
-
|
16
|
-
## 2.1.1
|
17
|
-
|
18
|
-
### bug fix
|
19
|
-
* Fix XSS vulnerability on label, hint and error components.
|
20
|
-
|
21
|
-
## 2.1.0
|
22
|
-
|
23
|
-
### enhancements
|
24
|
-
* `input_field` supports components that don't generate tags
|
25
|
-
as `:min_max`, `:maxlength`, `:placeholder`, `:pattern`, `:readonly`.
|
26
|
-
Closes [#362](https://github.com/plataformatec/simple_form/issues/632).
|
27
|
-
([@nashby](https://github.com/nashby))
|
28
|
-
* support for Rails eager loading.
|
29
|
-
Closes [#478](https://github.com/plataformatec/simple_form/issues/478).
|
30
|
-
* generate required attribute for `date_time` input.
|
31
|
-
([@nashby](https://github.com/nashby))
|
32
|
-
Closes [#730](https://github.com/plataformatec/simple_form/issues/730).
|
33
|
-
* `grouped_collection_select` now accepts proc/lambda as label and value method.
|
34
|
-
([@svendahlstrand](https://github.com/svendahlstrand))
|
35
|
-
Closes [#623](https://github.com/plataformatec/simple_form/issues/623).
|
36
|
-
* Add Zurb Foundation 3 integration.
|
37
|
-
([@balexand](https://github.com/balexand))
|
38
|
-
* Generates additional wrapper class based on object + attribute name.
|
39
|
-
([@lucasmazza](https://github.com/lucasmazza))
|
40
|
-
Closes [#576](https://github.com/plataformatec/simple_form/issues/576).
|
41
|
-
* Allow `input_field` to work with `:defaults` options.
|
42
|
-
([@smidwap](https://github.com/smidwap))
|
43
|
-
|
44
|
-
### bug fix
|
45
|
-
* Do not lookup for hints if it was explicitly given false.
|
46
|
-
After #405 we added hint classes for the wrappers, but this has forced the
|
47
|
-
loading of the hint text doing I18n lookups, even though it was explicitly
|
48
|
-
given false. This checks for the option in `#has_hint?`, avoiding the lookup
|
49
|
-
in such cases. This issues has been caught with #627, thanks to
|
50
|
-
([@shwoodard](https://github.com/shwoodard)).
|
51
|
-
* Fix default I18n lookup for association input.
|
52
|
-
([@nashby](https://github.com/nashby))
|
53
|
-
Closes [#679](https://github.com/plataformatec/simple_form/issues/679).
|
54
|
-
* Fix escaping issue in `label_input` component
|
55
|
-
([@allomov](https://github.com/allomov))
|
56
|
-
|
57
|
-
Please check [v2.0](https://github.com/plataformatec/simple_form/blob/v2.0/CHANGELOG.md) for previous changes.
|
27
|
+
Please check [v2.1](https://github.com/plataformatec/simple_form/blob/v2.1/CHANGELOG.md) for previous changes.
|