simple_form 2.0.0 → 3.5.1

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.

Files changed (103) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +97 -198
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +572 -296
  5. data/lib/generators/simple_form/install_generator.rb +17 -7
  6. data/lib/generators/simple_form/templates/README +3 -4
  7. data/lib/generators/simple_form/templates/_form.html.erb +1 -0
  8. data/lib/generators/simple_form/templates/_form.html.haml +1 -0
  9. data/lib/generators/simple_form/templates/config/initializers/{simple_form.rb.tt → simple_form.rb} +57 -63
  10. data/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb +155 -0
  11. data/lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb +111 -0
  12. data/lib/generators/simple_form/templates/config/locales/simple_form.en.yml +14 -7
  13. data/lib/simple_form/action_view_extensions/builder.rb +5 -305
  14. data/lib/simple_form/action_view_extensions/form_helper.rb +18 -20
  15. data/lib/simple_form/components/errors.rb +30 -3
  16. data/lib/simple_form/components/hints.rb +10 -3
  17. data/lib/simple_form/components/html5.rb +17 -3
  18. data/lib/simple_form/components/label_input.rb +21 -2
  19. data/lib/simple_form/components/labels.rb +16 -11
  20. data/lib/simple_form/components/maxlength.rb +19 -12
  21. data/lib/simple_form/components/min_max.rb +4 -2
  22. data/lib/simple_form/components/minlength.rb +48 -0
  23. data/lib/simple_form/components/pattern.rb +5 -4
  24. data/lib/simple_form/components/placeholders.rb +3 -2
  25. data/lib/simple_form/components/readonly.rb +3 -2
  26. data/lib/simple_form/components.rb +15 -11
  27. data/lib/simple_form/error_notification.rb +4 -3
  28. data/lib/simple_form/form_builder.rb +283 -105
  29. data/lib/simple_form/helpers/autofocus.rb +1 -0
  30. data/lib/simple_form/helpers/disabled.rb +1 -0
  31. data/lib/simple_form/helpers/readonly.rb +1 -0
  32. data/lib/simple_form/helpers/required.rb +1 -0
  33. data/lib/simple_form/helpers/validators.rb +4 -3
  34. data/lib/simple_form/helpers.rb +7 -6
  35. data/lib/simple_form/i18n_cache.rb +1 -0
  36. data/lib/simple_form/inputs/base.rb +76 -23
  37. data/lib/simple_form/inputs/block_input.rb +3 -2
  38. data/lib/simple_form/inputs/boolean_input.rb +55 -16
  39. data/lib/simple_form/inputs/collection_check_boxes_input.rb +2 -1
  40. data/lib/simple_form/inputs/collection_input.rb +41 -18
  41. data/lib/simple_form/inputs/collection_radio_buttons_input.rb +11 -19
  42. data/lib/simple_form/inputs/collection_select_input.rb +5 -2
  43. data/lib/simple_form/inputs/date_time_input.rb +23 -12
  44. data/lib/simple_form/inputs/file_input.rb +5 -2
  45. data/lib/simple_form/inputs/grouped_collection_select_input.rb +16 -3
  46. data/lib/simple_form/inputs/hidden_input.rb +5 -2
  47. data/lib/simple_form/inputs/numeric_input.rb +4 -8
  48. data/lib/simple_form/inputs/password_input.rb +6 -4
  49. data/lib/simple_form/inputs/priority_input.rb +5 -2
  50. data/lib/simple_form/inputs/range_input.rb +2 -1
  51. data/lib/simple_form/inputs/string_input.rb +6 -4
  52. data/lib/simple_form/inputs/text_input.rb +6 -3
  53. data/lib/simple_form/inputs.rb +20 -17
  54. data/lib/simple_form/map_type.rb +1 -0
  55. data/lib/simple_form/railtie.rb +15 -0
  56. data/lib/simple_form/tags.rb +69 -0
  57. data/lib/simple_form/version.rb +2 -1
  58. data/lib/simple_form/wrappers/builder.rb +12 -35
  59. data/lib/simple_form/wrappers/leaf.rb +29 -0
  60. data/lib/simple_form/wrappers/many.rb +12 -7
  61. data/lib/simple_form/wrappers/root.rb +7 -4
  62. data/lib/simple_form/wrappers/single.rb +12 -3
  63. data/lib/simple_form/wrappers.rb +3 -1
  64. data/lib/simple_form.rb +118 -63
  65. data/test/action_view_extensions/builder_test.rb +230 -164
  66. data/test/action_view_extensions/form_helper_test.rb +107 -39
  67. data/test/components/label_test.rb +105 -87
  68. data/test/form_builder/association_test.rb +131 -62
  69. data/test/form_builder/button_test.rb +15 -14
  70. data/test/form_builder/error_notification_test.rb +11 -10
  71. data/test/form_builder/error_test.rb +188 -34
  72. data/test/form_builder/general_test.rb +247 -102
  73. data/test/form_builder/hint_test.rb +59 -32
  74. data/test/form_builder/input_field_test.rb +138 -25
  75. data/test/form_builder/label_test.rb +84 -13
  76. data/test/form_builder/wrapper_test.rb +236 -33
  77. data/test/generators/simple_form_generator_test.rb +15 -4
  78. data/test/inputs/boolean_input_test.rb +147 -13
  79. data/test/inputs/collection_check_boxes_input_test.rb +166 -71
  80. data/test/inputs/collection_radio_buttons_input_test.rb +229 -113
  81. data/test/inputs/collection_select_input_test.rb +222 -85
  82. data/test/inputs/datetime_input_test.rb +134 -47
  83. data/test/inputs/disabled_test.rb +62 -21
  84. data/test/inputs/discovery_test.rb +70 -10
  85. data/test/inputs/file_input_test.rb +4 -3
  86. data/test/inputs/general_test.rb +90 -26
  87. data/test/inputs/grouped_collection_select_input_test.rb +88 -23
  88. data/test/inputs/hidden_input_test.rb +7 -5
  89. data/test/inputs/numeric_input_test.rb +56 -46
  90. data/test/inputs/priority_input_test.rb +31 -16
  91. data/test/inputs/readonly_test.rb +68 -27
  92. data/test/inputs/required_test.rb +63 -18
  93. data/test/inputs/string_input_test.rb +76 -51
  94. data/test/inputs/text_input_test.rb +21 -8
  95. data/test/simple_form_test.rb +9 -0
  96. data/test/support/discovery_inputs.rb +39 -2
  97. data/test/support/misc_helpers.rb +176 -20
  98. data/test/support/mock_controller.rb +13 -7
  99. data/test/support/models.rb +187 -71
  100. data/test/test_helper.rb +38 -39
  101. metadata +53 -39
  102. data/lib/simple_form/core_ext/hash.rb +0 -16
  103. data/test/support/mock_response.rb +0 -14
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 26d8e98f7207ee39c87221a646468a32291c982b
4
+ data.tar.gz: c3706e88eef3b4804381d8dbafd343819dbea517
5
+ SHA512:
6
+ metadata.gz: ee943633a1817a276e27b2aa55a9767169bf75791e17d0fe236f10c057f9442187ca0f6914da62e070a5418ec06c9d31dd61c2f662ee4c99fe52cec02ec1edd0
7
+ data.tar.gz: f5019c5c6b057a008d5c1403d030798f3bdf2393b42410afa1cdc3e8feecd4c79e4a721a3a1fd976f147460ca497a199f9092834d4d26fb32d76c1cadbab2454
data/CHANGELOG.md CHANGED
@@ -1,234 +1,133 @@
1
- ## 2.0.0
1
+ ## Unreleased
2
2
 
3
- ### enhancements
4
- * Add `button_class` configuration to change the class of buttons. ([@sryche](https://github.com/sryche))
5
- * Add `disabled` class to a disabled input.
6
- * Generate configuration file with `browser_validations` disabled.
7
- * Add option and configuration to specify the collection wrapper class. ([@mfila](https://github.com/mfila))
8
- * Add proc support to `collection` option. ([@jeffkreeftmeijer](https://github.com/jeffkreeftmeijer))
9
- * `simple_form_for` allows default options for its inputs `:defaults => {}`.
10
- * Add `readonly` as option of input method. ([@Untainted123](https://github.com/Untainted123))
11
- * `simple_fields_for` for inherits wrapper option form the form builder. ([@nashby](https://github.com/nashby))
12
- * Use action prefix in the form css class. Closes [#360](https://github.com/plataformatec/simple_form/issues/360).
13
- This is not backward compatible with the previous versions of SimpleForm.
14
- For more informations see [this comment](https://github.com/plataformatec/simple_form/issues/360#issuecomment-3000780).
15
- ([@nashby](https://github.com/nashby))
16
- * Add a readonly component that does automatically readonly lookup from object
17
- * Add support for proc or lambda as option for format validator ([@nashby](https://github.com/nashby))
18
- * Handle validates_length_of :is option in maxlength ([@nashby](https://github.com/nashby))
19
- * Add field_with_hint css class to the wrapper when the input has a hint, similar to field_with_errors ([@nashby](https://github.com/nashby))
20
- * Add :grouped_select input type, mapping to Rails grouped_collection_select helper ([@semaperepelitsa](https://github.com/semaperepelitsa))
21
- * Add automatic translation of options for collection inputs given a collection of symbols ([@klobuczek](https://github.com/klobuczek))
22
- * Add `:boolean_style` config to change how check boxes and radios will be displayed.
23
- Options are `:inline = input + label` (default) and `:nested = label > input`.
24
- * Add possibility to give a block to `collection_radio` and `collection_check_boxes`,
25
- yielding a custom builder to generate custom label and input structure. It
26
- is used internally with the :nested option for `:boolean_style`, and is useful
27
- to allow some more customization if required.
28
- * Do not generate hidden check box field when using nested boolean style, as it is considered
29
- invalid markup in HTML5. This will work by default in Rails > 3.2.1 (not released at this time),
30
- and is backported inside SimpleForm builder extensions.
31
- More info in [#215](https://github.com/plataformatec/simple_form/issues/215)
32
- * Add `item_wrapper_class` configuration option for collection radio buttons / check boxes inputs.
33
- * Change default generator templates to use .form-inputs and .form-actions classes in wrapper divs.
34
- (the latter is the default in bootstrap, so this makes it easier to integrate).
35
- * Field error now accepts HTML tags ([@edison](https://github.com/edison))
36
- * Add `generate_additional_classes_for` config option to selectively disable extra
37
- css classes for components - wrapper, label and input. ([krzyzak](https://github.com/krzyzak))
38
-
39
- ### deprecation
40
- * Deprecate part of the old configuration API in favor of the wrapper API which allows you to customize your inputs
41
- in a more flexible way. See [this guide](https://github.com/plataformatec/simple_form/wiki/Upgrading-to-Simple-Form-2.0)
42
- to know how upgrade.
43
- * Deprecate the `translate` configuration in favor of `translate_labels`
44
- * Deprecate the `html5` configuration in favor of a new `html5` component
45
- * Deprecate `:radio` input type in favor of `:radio_buttons`
46
- * Deprecate `collection_radio` form helper in favor of `collection_radio_buttons`
47
- (the label class has changed as well)
48
- * Remove `error_notification_id` configuration
49
-
50
- ### bug fix
51
- * Fix i18n lookup with attributes with same name of models.
52
- Closes [#149](https://github.com/plataformatec/simple_form/issues/149)
53
- and [#364](https://github.com/plataformatec/simple_form/issues/364).
54
- ([@nashby](https://github.com/nashby) and [@MarceloCajueiro](https://github.com/MarceloCajueiro))
55
- * Do not generate `for` attribute for the collection label when it is a checkbox or radio.
56
- Closes [#344](https://github.com/plataformatec/simple_form/issues/344).
57
- ([@nashby](https://github.com/nashby) and [@mfila](https://github.com/mfila))
58
- * Select can have required option when the `:include_blank` option is passed.
59
- Closes [#340](https://github.com/plataformatec/simple_form/issues/340). ([@nashby](https://github.com/nashby))
60
- * `:checked` option should override the existing associations on `collection_check_boxes`.
61
- Closes [#341](https://github.com/plataformatec/simple_form/issues/341). ([@nashby](https://github.com/nashby))
62
- * Move default attribute translations out of root - use "defaults" key instead
63
- Closes [#384](https://github.com/plataformatec/simple_form/issues/384). ([@fringd](https://github.com/fringd))
64
- * Fix label to datetime inputs to point to first select. ([@georgehemmings](https://github.com/georgehemmings))
65
- * Fix usage of f.button :button with Rails 3.2.
66
- Closes [#449](https://github.com/plataformatec/simple_form/issues/449).
67
-
68
- ## 1.5.2
69
-
70
- ### bug fix
71
- * Remove the internal usage of deprecated `:components`
72
-
73
- ## 1.5.1
74
-
75
- ### deprecation
76
- * `:components` options is now deprecated
3
+ ## 3.5.1
77
4
 
78
- ### bug fix
79
- * Fallback to default label when block is provided. ([@pivotal-casebook](https://github.com/pivotal-casebook))
80
- * Do not override default selection through attribute value in collection select when label/value methods are lambdas.
5
+ ### Enhancements
6
+ * Exclude hidden field when unchecked_value: false. [@fschwahn](https://github.com/fschwahn)
7
+ * Add frozen_string_literal magic comment to several files. [@oniofchaos](https://github.com/oniofchaos)
8
+ * Try convert @object to model in case we got decorated object [@timurvafin](https://github.com/timurvafin)
9
+ * Code cleanup [@Fornacula](https://github.com/Fornacula)
81
10
 
82
- ## 1.5.0
11
+ ### Bug fix
12
+ * Fix error when the scope from association has parameter. [@feliperenan](https://github.com/feliperenan)
13
+ * Only call `where` on associations when they respond to it. [@anicholson](https://github.com/anicholson)
14
+ * require 'action_pack' before using it. [@etagwerker](https://github.com/etagwerker)
15
+ * Check if Rails.env is defined. [@etagwerker](https://github.com/etagwerker)
16
+ * Fix minlength. [@mameier](https://github.com/mameier)
17
+ * Make errors_on_attribute return [] when not present. [@redrick](https://github.com/redrick)
18
+ * Fix boolean inputs in nested style for label non-string. [@feliperenan](https://github.com/feliperenan)
83
19
 
84
- ### enhancements
85
- * Simplified generator by using directory action. ([@rupert654](https://github.com/rupert654))
86
- * Support for `maxlength` on string inputs inferred from validation. ([@srbartlett](https://github.com/srbartlett))
87
- * Change form css class handling to only add the dom class when one is not given to the form call.
88
- ([@patrick99e99](https://github.com/patrick99e99))
89
- * Support for required attributes when action validations are present. ([@csegura](http://github.com/csegura))
90
- * Do not generate `size` attribute for numeric input. ([@csegura](https://github.com/jasonmp85))
91
- * Support for `maxlength` on text area inputs inferred from validation.
92
- * Support for `pattern` on text field inferred from validation when `:pattern` is true.
93
- * Break Text, Password and File into their own inputs.
94
- * Support easy enabling and disabling of components for specific inputs.
95
- * Add HTML5 range input.
20
+ ## 3.5.0
96
21
 
97
- ### bug fix
98
- * Fix bug when `simple_fields_for` is used with a hash like models and Rails 3.1.
99
- * Fix bug that does not remove the `:item_wrapper_tag` or the `:collection_wrapper_tag` on collection
100
- inputs when nil or false value is passed to these options. ([@dw2](https://gitbub.com/dw2))
101
- * Fix bug that disable the entire select and wrapper when `disabled` option is a string or array.
102
- * Fix bug when using label/value methods as procs together with disabled/selected options as procs for select inputs.
22
+ * Updated gem dependency to support Rails 5.1.x.
103
23
 
104
- ## 1.4.2
24
+ ## 3.4.0
105
25
 
106
- ### enhancements
107
- * Rails 3.1 support.
26
+ * Removed Ruby 2.4.0 `Integer` unification deprecation warning.
27
+ * Removed EOL Ruby 1.9.3 from the build matrix.
28
+ * Added `minlength` component.
29
+ * `boolean_label_class` can be set on a per-input basis.
108
30
 
109
- ## 1.4.1
31
+ ## 3.3.1
110
32
 
111
- ### enhancements
112
- * ignore required attribute when conditional validations are present.
33
+ ### Bug fix
113
34
 
114
- ### bug fix
115
- * Do not use `required='required'` when browser validations are turned off.
116
- * Sanitize HMTL attributes in error and hint helpers when options are present.
117
- * Improve i18n lookup by ignoring explicit child index given to form builder.
118
- (tests by [@rywall](https://github.com/rywall))
119
- * Fixes the form specific validation option if specified on the form itself. ([@medihack](https://github.com/medihack))
35
+ * Fix support for symbols when looking up types with `ActiveModel::Type`.
120
36
 
121
- ## 1.4.0
37
+ ## 3.3.0
122
38
 
123
39
  ### enhancements
124
- * Add label class configuration option. ([@reu](http://github.com/reu))
125
- * Improve i18n lookup (labels/hints/placeholders) for nested models.
126
- * Use the given custom builder with `simple_fields_for`. ([@giniedp](https://github.com/giniedp))
127
- * Add slim form generator. ([@fagiani](https://github.com/fagiani))
128
- * Add `form_class` configuration option. ([@fagiani](https://github.com/fagiani))
129
- * Default step of `any` for number input with non integer attributes. ([@fedesoria](https://github.com/fedesoria))
130
- * Add option to disable HTML5 browser validations on all forms. ([@coryschires](https://github.com/coryschires))
131
- * Add option to disable all HTML5 extensions. ([@wolframarnold](https://github.com/wolframarnold))
132
- * Add `input_field` helper to form builder. ([@jeroenhouben](https://github.com/jeroenhouben))
133
- * Allow inputs to be discovered on demand by placing them at app/inputs (a la formtastic).
134
- * Add `full_error` on that shows the error with the attribute name.
40
+ * Add the `aria-invalid` attribute on inputs with errors.
41
+ * Added support for the new `ActiveModel::Type` API over Active Record's
42
+ column objects.
135
43
 
136
44
  ### bug fix
137
- * Fix for file attributes automatic detection, to work with virtual attributes.
138
- * Fix for numeric fields validation options using symbols and procs.
139
- * Fix password attributes to add `size` and `maxlength` options the same way as string. ([@fedesoria](https://github.com/fedesoria))
140
- * Fix bug with custom form builders and new mappings being added to the superclass builder. ([@rdvdijk](https://github.com/rdvdijk))
141
- * Fix HTML validation issue with `collection_check_boxes`.
45
+ * Fix `merge_wrapper_options` to correctly merge options with duplicated keys. [@herminiotorres](https://github.com/herminiotorres)
46
+ Closes [#1278](https://github.com/plataformatec/simple_form/issues/1278).
142
47
 
143
- ## 1.3.1
48
+ ## 3.2.1
144
49
 
145
50
  ### enhancements
146
- * Add `:autofocus` HTML5 attribute support. ([@jpzwarte](https://github.com/jpzwarte))
147
- * Add possibility to specify custom builder and inherit mappings. ([@rejeep](https://github.com/rejeep))
148
- * Make custom mappings work with all attributes types. ([@rafaelfranca](https://github.com/rafaelfranca))
149
- * Add support for procs/lambdas in text/value methods for `collection_select`.
51
+ * Updated gem dependency to support Rails 5.0.x.
150
52
 
151
- ### deprecation
152
- * removed the deprecated `:remote_form_for`
53
+ ## 3.2.0
153
54
 
154
55
  ### bug fix
155
- * Only add the `required` HTML 5 attribute for valid inputs, disable in selects (not allowed).
156
- * Fix error when using hints without an attribute.
157
- ([@butsjoh](https://github.com/butsjoh) and [@rafaelfranca](https://github.com/rafaelfranca))
158
- * Fix messy html output for hint, error and label components.
159
- ([@butsjoh](https://github.com/butsjoh) and [@rafaelfranca](https://github.com/rafaelfranca))
160
- * Allow direct setting of for attribute on label. ([@Bertg](https://github.com/Bertg))
56
+ * Improve performance of input generation by disabling support for `_html` translations. This reverts the feature introduced on the 3.1.0 branch
161
57
 
162
- ## 1.3.0
58
+ ## 3.1.1
163
59
 
164
60
  ### enhancements
165
- * Allow collection input to accept a collection of symbols.
166
- * Add default css class to button.
167
- * Allow forms for objects that do not respond to the `errors` method.
168
- * `collection_check_boxes` and `collection_radio` now wrap the input in the label.
169
- * Automatic add min/max values for numeric attributes based on validations and step for integers - HTML5.
170
- ([@dasch](https://github.com/dasch))
171
- * Add `:placeholder` option for string inputs, allowing customization through I18n - HTML5.
172
- ([@jonathan](https://github.com/jonathan))
173
- * Add `:search` and `:tel` input types, with `:tel` mapping automatically from attributes matching "phone" - HTML5.
174
- * Add `:required` html attribute for required inputs - HTML5.
175
- * Add optional `:components` option to input to control component rendering. ([@khoan](https://github.com/khoan))
176
- * Add `SimpleForm.translate` as an easy way to turn off SimpleForm internal translations.
177
- * Add `:disabled` option for all inputs. ([@fabiob](https://github.com/fabiob))
178
- * Add collection wrapper tag and item wrapper tag to wrap elements in collection helpers - radio / check boxes.
179
- * Add `SimpleForm.input_mappings` to allow configuring custom mappings for inputs. ([@TMaYaD](https://github.com/TMaYaD))
61
+ * Add the `disabled_class` to the label when the input is disabled. [@rhodrid](https://github.com/rhodrid)
180
62
 
181
63
  ### bug fix
182
- * Search for validations on both association and attribute.
183
- * Use `controller.action_name` to lookup action only when available, to fix issue with Rspec views tests.
184
- ([@rafaelfranca](https://github.com/rafaelfranca))
64
+ * Make it possible to override `required` value that was previously set in the wrapper. [@nashby](https://github.com/nashby)
185
65
 
186
- ## 1.2.2
66
+ * `date/time/datetime` inputs now correctly generate the label `for` attribute when
67
+ HTML5 compatibility is explicitly enabled. [@ericsullivan](https://github.com/ericsullivan)
187
68
 
188
- ### enhancements
189
- * Compatibility with Rails 3 RC.
69
+ * The datetime, date, and time inputs now have a nice format by default on bootstrap.
70
+ [@ulissesalmeida](https://github.com/ulissesalmeida) [@eltonchrls](https://github.com/eltonchrls)
190
71
 
191
- ## 1.2.1
72
+ * Now it is possible to set custom input mappings for collections.
192
73
 
193
- ### enhancements
194
- * Added haml generator support. ([@grimen](https://github.com/grimen))
195
- * Added `error_notification` message to form builder.
196
- * Added required by default as configuration option.
197
- * Added `label_input` as component, allowing boolean to change its order (input appearing first than label).
198
- * Added `error_method` to tidy up how errors are exhibited.
199
- * Added error class on wrappers. ([@jduff](https://github.com/jduff))
200
- * Changed numeric types to have `type=number` for HTML5.
201
-
202
- ## 1.2.0
74
+ Example:
203
75
 
204
- ### deprecation
205
- * Changed `simple_form_install` generator to `simple_form:install`.
206
-
207
- ### enhancements
208
- * Added support to presence validation to check if attribute is required or not. ([@gcirne](https://github.com/gcirne))
209
- * Added `input` as class to wrapper tag.
210
- * Added config options for hint and error tags. ([@tjogin](https://github.com/tjogin))
76
+ ```ruby
77
+ # On configuration:
78
+ config.input_mappings = { /gender$/ => :check_boxes }
211
79
 
212
- ## 1.1.3
80
+ # On form:
81
+ f.input :gender, collection: [:male, :female]
82
+ ```
83
+ [strangeworks](https://github.com/strangeworks)
213
84
 
214
- ### deprecation
215
- * removed `:conditions`, `:order`, `:joins` and `:include` support in `f.association`.
216
-
217
- ## 1.1.2
218
-
219
- ### bug fix
220
- * Ensure type is set to "text" and not "string".
221
-
222
- ## 1.1.1
223
-
224
- ### bug fix
225
- * Fix some escaping issues.
226
-
227
- ## 1.1.0
85
+ ## 3.1.0
228
86
 
229
87
  ### enhancements
230
- * Rails 3 support with generators, templates and HTML 5.
231
-
232
- ## 1.0
88
+ * Update foundation generator to version 5. [@jorge-d](https://github.com/jorge-d)
89
+ * Add mapping to `uuid` columns.
90
+ * Add custom namespaces for custom inputs feature. [@vala](https://github.com/vala)
91
+ * Add `:unless_blank` option to the wrapper API. [@IanVaughan](https://github.com/IanVaughan)
92
+ * Add support to html markup in the I18n options. [@laurocaetano](https://github.com/laurocaetano)
93
+ * Add the `full_error` component. [@laurocaetano](https://github.com/laurocaetano)
94
+ * Add support to `scope` to be used on associations. [@laurocaetano](https://github.com/laurocaetano)
95
+ * Execute the association `condition` in the object context. [@laurocaetano](https://github.com/laurocaetano)
96
+ * Check if the given association responds to `order` before calling it. [@laurocaetano](https://github.com/laurocaetano)
97
+ * Add Bootstrap 3 initializer template.
98
+ * For radio or checkbox collection always use `:item_wrapper_tag` to wrap the content and add `label` when using `boolean_style` with `:nested` [@kassio](https://github.com/kassio) and [@erichkist](https://github.com/erichkist)
99
+ * `input_field` uses the same wrapper as input but only with attribute components. [@nashby](https://github.com/nashby)
100
+ * Add wrapper mapping per form basis [@rcillo](https://github.com/rcillo) and [@bernardoamc](https://github.com/bernardoamc)
101
+ * Add `for` attribute to `label` when collections are rendered as radio or checkbox [@erichkist](https://github.com/erichkist), [@ulissesalmeida](https://github.com/ulissesalmeida) and [@fabioyamate](https://github.com/fabioyamate)
102
+ * Add `include_default_input_wrapper_class` config [@luizcosta](https://github.com/luizcosta)
103
+ * Map `datetime`, `date` and `time` input types to their respective HTML5 input tags
104
+ when the `:html5` is set to `true` [@volmer](https://github.com/volmer)
105
+ * Add `boolean_label_class` config.
106
+ * Add `:html` option to include additional attributes on custom wrappers [@remofritzsche](https://github.com/remofritzsche) and [@ulissesalmeida](https://github.com/ulissesalmeida)
107
+ * Make possible to use the Wrappers API to define attributes for the components.
108
+ See https://github.com/plataformatec/simple_form/pull/997 for more information.
109
+ * Put a whitespace before the `inline_label` options of boolean input if it is present.
110
+ * Add support to configure the `label_text` proc at the wrapper level. [@NOX73](https://github.com/NOX73)
111
+ * `label_text` proc now receive three arguments (label, request, and if the label was explicit). [@timscott](https://github.com/timscott)
112
+ * Add I18n support to `:include_blank` and `:prompt` when `:translate` is used as value. [@haines](https://github.com/plataformatec/simple_form/pull/616)
113
+ * Add support to define custom error messages for the attributes.
114
+ * Add support to change the I18n scope to be used in Simple Form. [@nielsbuus](https://github.com/nielsbuus)
115
+ * The default form class can now be overridden with `html: { :class }`. [@rmm5t](https://github.com/rmm5t)
233
116
 
234
- * First release.
117
+ ### bug fix
118
+ * Fix `full_error` when the attribute is an association. [@mvdamme](https://github.com/jorge-d)
119
+ * Fix suppport to `:namespace` and `:index` options for nested check boxes and radio buttons when the attribute is an association.
120
+ * Collection input that uses automatic collection translation properly sets checked values.
121
+ Closes [#971](https://github.com/plataformatec/simple_form/issues/971) [@nashby](https://github.com/nashby)
122
+ * Collection input generates `required` attribute if it has `prompt` option. [@nashby](https://github.com/nashby)
123
+ * Grouped collection uses the first non-empty object to detect label and value methods.
124
+
125
+ ## deprecation
126
+ * Methods on custom inputs now accept a required argument with the wrapper options.
127
+ See https://github.com/plataformatec/simple_form/pull/997 for more information.
128
+ * SimpleForm.form_class is deprecated in favor of SimpleForm.default_form_class.
129
+ Future versions of Simple Form will not generate `simple_form` class for the form
130
+ element.
131
+ See https://github.com/plataformatec/simple_form/pull/1109 for more information.
132
+
133
+ Please check [v3.0](https://github.com/plataformatec/simple_form/blob/v3.0/CHANGELOG.md) for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 PlataformaTec http://blog.plataformatec.com.br/
1
+ Copyright (c) 2009-2016 Plataformatec http://plataformatec.com.br/
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the