simple_form 2.1.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of simple_form might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/CHANGELOG.md +22 -32
- data/README.md +161 -119
- data/lib/generators/simple_form/install_generator.rb +3 -3
- data/lib/generators/simple_form/templates/README +1 -1
- 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 +14 -14
- data/lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb +3 -3
- data/lib/simple_form/action_view_extensions/builder.rb +1 -319
- data/lib/simple_form/action_view_extensions/form_helper.rb +2 -9
- data/lib/simple_form/components/html5.rb +5 -2
- data/lib/simple_form/components/labels.rb +3 -3
- 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 +155 -51
- data/lib/simple_form/helpers.rb +1 -1
- data/lib/simple_form/inputs/base.rb +6 -6
- data/lib/simple_form/inputs/block_input.rb +1 -1
- data/lib/simple_form/inputs/boolean_input.rb +6 -4
- data/lib/simple_form/inputs/collection_input.rb +6 -6
- 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/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 -92
- 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 +12 -12
- data/test/form_builder/general_test.rb +71 -52
- data/test/form_builder/hint_test.rb +22 -22
- data/test/form_builder/input_field_test.rb +29 -12
- data/test/form_builder/label_test.rb +7 -7
- data/test/form_builder/wrapper_test.rb +21 -21
- data/test/inputs/boolean_input_test.rb +35 -23
- 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 -45
- 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 +80 -62
- data/test/test_helper.rb +17 -34
- metadata +31 -29
- data/lib/simple_form/core_ext/hash.rb +0 -16
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1bda3ec212b0e4f1da3e765b704b417893098679
|
4
|
+
data.tar.gz: 81b0e670aae4612d40793b872f6fc553fd6d05ab
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e242bc383e74b99f508350376d007c18bd7aedb325632d2d3a8a28043275efa03a9c5b90e6d4a00cec68b53de6636bdb43b3a0af5a83160b8a8bad88919d6248
|
7
|
+
data.tar.gz: 70b1845d8a357e8e4ff85def7540d849a8fcd4d070a78e185f2c369da7a453b7def368309dc3339a5a5c2b2f8f47613db2be328ac0dbbb90c3fa74aef996f80a
|
data/CHANGELOG.md
CHANGED
@@ -1,37 +1,27 @@
|
|
1
|
-
##
|
1
|
+
## 3.0.0
|
2
2
|
|
3
3
|
### enhancements
|
4
|
-
* `
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
*
|
9
|
-
|
10
|
-
*
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
Closes [#623](https://github.com/plataformatec/simple_form/issues/623).
|
16
|
-
* Add Zurb Foundation 3 integration.
|
17
|
-
([@balexand](https://github.com/balexand))
|
18
|
-
* Generates additional wrapper class based on object + attribute name.
|
19
|
-
([@lucasmazza](https://github.com/lucasmazza))
|
20
|
-
Closes [#576](https://github.com/plataformatec/simple_form/issues/576).
|
21
|
-
* Allow `input_field` to work with `:defaults` options.
|
22
|
-
([@smidwap](https://github.com/smidwap))
|
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)
|
23
15
|
|
24
16
|
### bug fix
|
25
|
-
*
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
in
|
30
|
-
|
31
|
-
*
|
32
|
-
|
33
|
-
|
34
|
-
* Fix escaping issue in `label_input` component
|
35
|
-
([@allomov](https://github.com/allomov))
|
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)
|
20
|
+
* Add "checkbox" class to the label of boolean input when there is no `:label`
|
21
|
+
in `generate_additional_classes_for` config option [@nashby](https://github.com/nashby)
|
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)
|
36
26
|
|
37
|
-
Please check [v2.
|
27
|
+
Please check [v2.1](https://github.com/plataformatec/simple_form/blob/v2.1/CHANGELOG.md) for previous changes.
|