2016-07-01 13:31:52 -04:00
## Unreleased
2019-10-20 07:43:27 -04:00
### Bug fix
* Fix 'aria-required' field generated by prompt. [@CarlosAlbertoSantos ](https://github.com/CarlosAlbertoSantos )
2019-10-04 10:43:30 -04:00
## 5.0.1
2019-10-03 16:10:52 -04:00
### Bug fix
* Replace `_url` with `remote_url` when trying to guess file inputs [@tegon ](https://github.com/tegon ). This has the side-effect of changing carrierwave's support from `0.2.1` to `0.2.2` .
2019-09-19 12:39:38 -04:00
## 5.0.0
2019-01-30 15:37:01 -05:00
### Enhancements
* Set multiple attribute for grouped selects also. [@ollym ](https://github.com/ollym )
* Removes or renames label classes. [Abduvakilov ](https://github.com/Abduvakilov )
* Support to label custom classes for inline collections. [@feliperenan ](https://github.com/feliperenan )
2019-02-14 06:53:32 -05:00
* Update bootstrap generator template to match v4.3.x. [@m5o ](https://github.com/m5o )
2019-04-02 21:12:38 -04:00
* Allow "required" attribute in generated select elements of PriorityInput. [@mcountis ](https://github.com/mcountis )
2019-01-30 15:37:01 -05:00
2019-09-19 12:39:38 -04:00
### Bug fix
* Do not call `#send` in form object to check whether the attribute is a file input. [@tegon ](https://github.com/tegon )
## Deprecations
* The config `SimpleForm.file_methods` is deprecated and it has no effect. Simple Form now supports automatically discover of file inputs for the following Gems: activestorage, carrierwave, paperclip, refile and shrine. If you are using a custom method that is not from one of the supported Gems, please change your forms to pass the input type explicitly:
```erb
< %= form.input :avatar, as: :file %>
```
See http://blog.plataformatec.com.br/2019/09/incorrect-access-control-in-simple-form-cve-2019-16676 for more information.
2018-11-23 10:28:21 -05:00
## 4.1.0
2018-05-30 16:09:41 -04:00
### Enhancements
2018-10-05 23:19:51 -04:00
* Guess input type more carefully. [@sringling ](https://github.com/sringling )
* Allow custom error on forms without model. [@victorperez ](https://github.com/victorperez )
2018-10-30 06:39:05 -04:00
* Do not support Ruby < 2.3 anymore . [@gssbzn ](https://github.com/gssbzn )
2018-11-23 10:28:21 -05:00
* Add color input type. [@gssbzn ](https://github.com/gssbzn )
2018-05-30 16:09:41 -04:00
2018-06-08 18:29:03 -04:00
### Bug fix
2018-10-05 23:19:51 -04:00
* Improve disabled option to input_field. [@betelgeuse ](https://github.com/betelgeuse )
2018-09-21 22:36:22 -04:00
* Memoize `input_html_classes` in `SimpleForm::Inputs::Base` . [@RigoTheDev ](https://github.com/RigoTheDev )
2018-09-21 22:39:12 -04:00
* Fix column type citext HTML5 input type bug. [@brucew ](https://github.com/brucew )
2018-10-05 23:19:51 -04:00
* Use form attribute in the nested boolean hidden field when it is given. [@feliperenan ](https://github.com/feliperenan )
2018-06-08 18:29:03 -04:00
2018-05-18 18:32:00 -04:00
## 4.0.1
2018-05-18 08:27:49 -04:00
### Bug fix
* Do not support Rails 4 anymore. [@rafaelfranca ](https://github.com/rafaelfranca )
* Add missing comma. [@vill ](https://github.com/vill )
2018-04-11 08:53:08 -04:00
## 4.0.0
### Enhancements
2018-04-11 08:47:16 -04:00
* Add bootstrap v4.1 generator template. [@m5o ](https://github.com/m5o )
2018-04-11 08:44:49 -04:00
* Add Rails 5.2 support. [@gobijan ](https://github.com/gobijan )
2018-03-08 20:50:21 -05:00
* Add API to register custom components.[@feliperenan](https://github.com/feliperenan)
* Allow custom errors classes to inputs.[@feliperenan](https://github.com/feliperenan)
2018-03-02 16:29:54 -05:00
* Remove support from Rails 4.0, 4.1 and 4.2. [@feliperenan ](https://github.com/feliperenan )
2017-12-08 18:31:01 -05:00
* Add support for citext, hstore, json & jsonb column types. [@swrobel ](https://github.com/swrobel )
2018-03-13 10:22:53 -04:00
* Add :valid_class on input wrapper when value is present and valid [@aeberlin ](https://github.com/aeberlin ), [@m5o ](https://github.com/m5o )
2018-03-22 17:21:29 -04:00
* Allow :valid_class to inputs when value is present and valid. [@m5o ](https://github.com/m5o )
2018-04-02 22:07:08 -04:00
* Allow validation classes on input_field. [@feliperenan ](https://github.com/feliperenan )
2018-04-06 23:38:25 -04:00
* Add basic ActiveStorage support. [@murb ](https://github.com/murb )
2018-02-16 10:27:25 -05:00
2018-03-01 07:26:15 -05:00
### Bug fix
* Fix horizontal form label position, from right to text-right. [@cavpollo ](https://github.com/cavpollo )
2018-03-01 07:39:38 -05:00
* Add base error display alongside existing errors. [@bluefalcon26 ](https://github.com/bluefalcon26 )
2018-03-01 07:52:58 -05:00
* Silent deprication warning for placeholder_text. [@moofkit ](https://github.com/moofkit )
2018-04-06 23:38:25 -04:00
* Use custom i18n scope for label required html. [@tvdeyen ](https://github.com/tvdeyen )
2018-03-01 07:26:15 -05:00
2018-02-15 16:11:06 -05:00
## 3.5.1
2017-11-28 19:02:20 -05:00
### Enhancements
2017-12-07 08:47:14 -05:00
* Exclude hidden field when unchecked_value: false. [@fschwahn ](https://github.com/fschwahn )
2017-11-28 19:02:20 -05:00
* Add frozen_string_literal magic comment to several files. [@oniofchaos ](https://github.com/oniofchaos )
2018-01-11 08:45:52 -05:00
* Try convert @object to model in case we got decorated object [@timurvafin ](https://github.com/timurvafin )
2018-02-27 17:47:08 -05:00
- From now, if you are using some object that inherits from `SimpleDelegator` , you must implement
2018-04-11 08:47:16 -04:00
`def to_model; self; end` . Otherwise, *Simple Form* will convert the decorated object to the model
2018-02-27 17:47:08 -05:00
since `SimpleDelegator` will delegate it to the model.
2018-01-11 18:21:32 -05:00
* Code cleanup [@Fornacula ](https://github.com/Fornacula )
2017-12-07 08:47:14 -05:00
2017-11-28 19:02:20 -05:00
### Bug fix
* Fix error when the scope from association has parameter. [@feliperenan ](https://github.com/feliperenan )
* Only call `where` on associations when they respond to it. [@anicholson ](https://github.com/anicholson )
* require 'action_pack' before using it. [@etagwerker ](https://github.com/etagwerker )
* Check if Rails.env is defined. [@etagwerker ](https://github.com/etagwerker )
2018-01-11 08:45:52 -05:00
* Fix minlength. [@mameier ](https://github.com/mameier )
2018-01-11 18:21:32 -05:00
* Make errors_on_attribute return [] when not present. [@redrick ](https://github.com/redrick )
2018-02-01 10:33:03 -05:00
* Fix boolean inputs in nested style for label non-string. [@feliperenan ](https://github.com/feliperenan )
2017-11-28 19:02:20 -05:00
2017-05-17 16:23:08 -04:00
## 3.5.0
* Updated gem dependency to support Rails 5.1.x.
2017-01-06 08:25:13 -05:00
## 3.4.0
2017-01-06 08:15:05 -05:00
* Removed Ruby 2.4.0 `Integer` unification deprecation warning.
* Removed EOL Ruby 1.9.3 from the build matrix.
2016-11-16 07:01:32 -05:00
* Added `minlength` component.
* `boolean_label_class` can be set on a per-input basis.
2016-08-26 09:43:39 -04:00
## 3.3.1
### Bug fix
* Fix support for symbols when looking up types with `ActiveModel::Type` .
2016-08-25 13:11:21 -04:00
## 3.3.0
2015-10-07 19:51:32 -04:00
### enhancements
2016-07-19 20:43:34 -04:00
* Add the `aria-invalid` attribute on inputs with errors.
2016-08-25 13:11:21 -04:00
* Added support for the new `ActiveModel::Type` API over Active Record's
column objects.
2015-10-07 19:51:32 -04:00
### bug fix
* Fix `merge_wrapper_options` to correctly merge options with duplicated keys. [@herminiotorres ](https://github.com/herminiotorres )
Closes [#1278 ](https://github.com/plataformatec/simple_form/issues/1278 ).
2016-07-01 13:31:52 -04:00
2015-12-20 18:24:11 -05:00
## 3.2.1
2016-07-19 20:43:34 -04:00
### enhancements
* Updated gem dependency to support Rails 5.0.x.
2015-12-20 18:24:11 -05:00
2015-09-22 09:15:52 -04:00
## 3.2.0
2014-12-26 13:41:19 -05:00
2015-09-22 09:15:52 -04:00
### bug fix
* Improve performance of input generation by disabling support for `_html` translations. This reverts the feature introduced on the 3.1.0 branch
2015-08-30 14:32:24 -04:00
## 3.1.1
2015-02-18 14:25:52 -05:00
### enhancements
* Add the `disabled_class` to the label when the input is disabled. [@rhodrid ](https://github.com/rhodrid )
2014-12-26 13:41:19 -05:00
### bug fix
2015-05-09 06:51:46 -04:00
* Make it possible to override `required` value that was previously set in the wrapper. [@nashby ](https://github.com/nashby )
2015-08-30 14:32:24 -04:00
2014-12-26 13:41:19 -05:00
* `date/time/datetime` inputs now correctly generate the label `for` attribute when
HTML5 compatibility is explicitly enabled. [@ericsullivan ](https://github.com/ericsullivan )
2015-04-01 07:41:54 -04:00
* The datetime, date, and time inputs now have a nice format by default on bootstrap.
2015-09-22 09:15:52 -04:00
[@ulissesalmeida ](https://github.com/ulissesalmeida ) [@eltonchrls ](https://github.com/eltonchrls )
2015-03-31 19:26:38 -04:00
2015-04-01 07:41:54 -04:00
* Now it is possible to set custom input mappings for collections.
2015-03-31 19:50:52 -04:00
Example:
```ruby
# On configuration:
config.input_mappings = { /gender$/ => :check_boxes }
# On form:
f.input :gender, collection: [:male, :female]
```
2015-04-01 07:41:54 -04:00
[strangeworks ](https://github.com/strangeworks )
2015-03-31 19:50:52 -04:00
2014-11-25 12:53:40 -05:00
## 3.1.0
2014-10-12 18:35:05 -04:00
### enhancements
* Update foundation generator to version 5. [@jorge-d ](https://github.com/jorge-d )
2014-07-07 20:14:49 -04:00
* Add mapping to `uuid` columns.
2014-06-26 17:34:02 -04:00
* Add custom namespaces for custom inputs feature. [@vala ](https://github.com/vala )
2014-06-23 15:49:04 -04:00
* Add `:unless_blank` option to the wrapper API. [@IanVaughan ](https://github.com/IanVaughan )
2014-04-04 13:49:18 -04:00
* Add support to html markup in the I18n options. [@laurocaetano ](https://github.com/laurocaetano )
2014-04-03 11:08:29 -04:00
* Add the `full_error` component. [@laurocaetano ](https://github.com/laurocaetano )
2014-04-02 13:43:34 -04:00
* Add support to `scope` to be used on associations. [@laurocaetano ](https://github.com/laurocaetano )
2014-04-01 10:57:42 -04:00
* Execute the association `condition` in the object context. [@laurocaetano ](https://github.com/laurocaetano )
2014-03-31 14:44:02 -04:00
* Check if the given association responds to `order` before calling it. [@laurocaetano ](https://github.com/laurocaetano )
2014-03-31 14:06:26 -04:00
* Add Bootstrap 3 initializer template.
2013-12-09 08:53:58 -05:00
* 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 )
2013-11-24 10:11:05 -05:00
* `input_field` uses the same wrapper as input but only with attribute components. [@nashby ](https://github.com/nashby )
2013-11-13 10:18:54 -05:00
* Add wrapper mapping per form basis [@rcillo ](https://github.com/rcillo ) and [@bernardoamc ](https://github.com/bernardoamc )
2013-11-18 15:38:48 -05:00
* 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 )
2013-11-12 17:18:52 -05:00
* Add `include_default_input_wrapper_class` config [@luizcosta ](https://github.com/luizcosta )
2013-11-13 15:25:41 -05:00
* Map `datetime` , `date` and `time` input types to their respective HTML5 input tags
2013-11-26 19:58:46 -05:00
when the `:html5` is set to `true` [@volmer ](https://github.com/volmer )
2014-03-12 16:09:02 -04:00
* Add `boolean_label_class` config.
2014-04-02 18:58:17 -04:00
* Add `:html` option to include additional attributes on custom wrappers [@remofritzsche ](https://github.com/remofritzsche ) and [@ulissesalmeida ](https://github.com/ulissesalmeida )
2014-03-14 17:50:57 -04:00
* Make possible to use the Wrappers API to define attributes for the components.
See https://github.com/plataformatec/simple_form/pull/997 for more information.
2014-03-31 13:01:48 -04:00
* Put a whitespace before the `inline_label` options of boolean input if it is present.
2014-04-02 18:58:17 -04:00
* Add support to configure the `label_text` proc at the wrapper level. [@NOX73 ](https://github.com/NOX73 )
2014-04-02 19:10:35 -04:00
* `label_text` proc now receive three arguments (label, request, and if the label was explicit). [@timscott ](https://github.com/timscott )
2014-04-03 14:27:45 -04:00
* Add I18n support to `:include_blank` and `:prompt` when `:translate` is used as value. [@haines ](https://github.com/plataformatec/simple_form/pull/616 )
2014-04-03 17:32:02 -04:00
* Add support to define custom error messages for the attributes.
2014-04-04 10:59:38 -04:00
* Add support to change the I18n scope to be used in Simple Form. [@nielsbuus ](https://github.com/nielsbuus )
2014-07-23 18:06:13 -04:00
* The default form class can now be overridden with `html: { :class }` . [@rmm5t ](https://github.com/rmm5t )
2013-11-13 10:18:54 -05:00
2013-11-03 06:19:52 -05:00
### bug fix
2014-11-25 12:53:40 -05:00
* Fix `full_error` when the attribute is an association. [@mvdamme ](https://github.com/jorge-d )
* Fix suppport to `:namespace` and `:index` options for nested check boxes and radio buttons when the attribute is an association.
2013-12-31 14:31:17 -05:00
* Collection input that uses automatic collection translation properly sets checked values.
Closes [#971 ](https://github.com/plataformatec/simple_form/issues/971 ) [@nashby ](https://github.com/nashby )
2013-11-03 06:19:52 -05:00
* Collection input generates `required` attribute if it has `prompt` option. [@nashby ](https://github.com/nashby )
2014-04-02 14:38:40 -04:00
* Grouped collection uses the first non-empty object to detect label and value methods.
2013-11-03 06:19:52 -05:00
2014-03-14 10:52:20 -04:00
## deprecation
2014-03-21 13:31:08 -04:00
* Methods on custom inputs now accept a required argument with the wrapper options.
2014-03-14 10:52:20 -04:00
See https://github.com/plataformatec/simple_form/pull/997 for more information.
2014-11-19 11:30:35 -05:00
* SimpleForm.form_class is deprecated in favor of SimpleForm.default_form_class.
Future versions of Simple Form will not generate `simple_form` class for the form
element.
2014-07-23 18:06:13 -04:00
See https://github.com/plataformatec/simple_form/pull/1109 for more information.
2014-03-14 10:52:20 -04:00
2014-04-14 10:29:45 -04:00
Please check [v3.0 ](https://github.com/plataformatec/simple_form/blob/v3.0/CHANGELOG.md ) for previous changes.