- Ruby 4.0 support (no changes required)
- Support procs on validators for minlength/maxlength, and improve validators logic across the board to match Rails #1859
- Add support for Ruby 3.4 and Rails 7.2/8.0/8.1. (no changes required)
- Drop support for Rails < 7 and Ruby < 2.7.
- Add
weekdayinput. #1846 - Remove redundant
aria-requiredattribute for required fields. #1823 - Integrate
:rich_text_areawith placeholders #1842 - Fix encrypted attributes improperly casted (later fixed in Rails) #1836
- Pass
baseobject tohuman_attribute_namein labels #1812
- Revert "Speed up input mapping lookup by avoiding rescuing exceptions" from v5.3.0, it caused a regression on dev/test environments with custom inputs.
- Try a slightly different approach to input lookups, without relying on regexp, to see if that helps with performance as originally intended.
- Add support to Ruby 3.3. (no changes required.)
- Add support for Rails 7.1. (no meaningful changes required.)
- Add
SimpleForm.deprecatorto integrate with new application deprecators in Rails 7.1. - Remove test files from the gem package. @orien
- Speed up input mapping lookup by avoiding rescuing exceptions. @meanphil @kriom @egeek
- Add support for Rails 7.0 and Ruby 3.1/3.2 (no changes required)
- Fix escaping issue on boolean input with
include_hidden: falseand custom wrapper. - Update Bootstrap install generator version 5. @mhw
- Accept proc as
group_methodfor grouped collection select - Honor
include_hiddenoption on inline boolean inputs @yboulkaid - Fix deprecation error when using country_select input.
- Remove
I18nCachemodule entirely. It was added complexity for very little gain in some translations, and caused extra trouble upgrading to Ruby 3. If you need that level of caching consider looking into I18n caching as a whole. - Add support for Ruby 3.0, drop support for Ruby < 2.5.
- Add support for Rails 6.1, drop support for Rails < 5.2.
- Move CI to GitHub Actions.
- Fix for ActiveStorage::Attached::Many. @enriquez
- Remove instruction to use form-inline class. @goalaleo
- Added RichTextAreaInput for ActionText. itsterry
- Skip valid_class check if no class defined. TALlama
- Fix 'aria-required' field generated by prompt. @CarlosAlbertoSantos
- Replace
_urlwithremote_urlwhen trying to guess file inputs @tegon. This has the side-effect of changing carrierwave's support from0.2.1to0.2.2.
- Set multiple attribute for grouped selects also. @ollym
- Removes or renames label classes. Abduvakilov
- Support to label custom classes for inline collections. @feliperenan
- Update bootstrap generator template to match v4.3.x. @m5o
- Allow "required" attribute in generated select elements of PriorityInput. @mcountis
- Do not call
#sendin form object to check whether the attribute is a file input. @tegon
- The config
SimpleForm.file_methodsis 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:
<%= 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.
- Guess input type more carefully. @sringling
- Allow custom error on forms without model. @victorperez
- Do not support Ruby < 2.3 anymore. @gssbzn
- Add color input type. @gssbzn
- Improve disabled option to input_field. @betelgeuse
- Memoize
input_html_classesinSimpleForm::Inputs::Base. @RigoTheDev - Fix column type citext HTML5 input type bug. @brucew
- Use form attribute in the nested boolean hidden field when it is given. @feliperenan
- Do not support Rails 4 anymore. @rafaelfranca
- Add missing comma. @vill
- Add bootstrap v4.1 generator template. @m5o
- Add Rails 5.2 support. @gobijan
- Add API to register custom components.@feliperenan
- Allow custom errors classes to inputs.@feliperenan
- Remove support from Rails 4.0, 4.1 and 4.2. @feliperenan
- Add support for citext, hstore, json & jsonb column types. @swrobel
- Add :valid_class on input wrapper when value is present and valid @aeberlin, @m5o
- Allow :valid_class to inputs when value is present and valid. @m5o
- Allow validation classes on input_field. @feliperenan
- Add basic ActiveStorage support. @murb
- Fix horizontal form label position, from right to text-right. @cavpollo
- Add base error display alongside existing errors. @bluefalcon26
- Silent deprecation warning for placeholder_text. @moofkit
- Use custom i18n scope for label required html. @tvdeyen
- Exclude hidden field when unchecked_value: false. @fschwahn
- Add frozen_string_literal magic comment to several files. @oniofchaos
- Try convert @object to model in case we got decorated object @timurvafin
- From now, if you are using some object that inherits from
SimpleDelegator, you must implementdef to_model; self; end. Otherwise, Simple Form will convert the decorated object to the model sinceSimpleDelegatorwill delegate it to the model.
- Code cleanup @Fornacula
- Fix error when the scope from association has parameter. @feliperenan
- Only call
whereon associations when they respond to it. @anicholson - require 'action_pack' before using it. @etagwerker
- Check if Rails.env is defined. @etagwerker
- Fix minlength. @mameier
- Make errors_on_attribute return [] when not present. @redrick
- Fix boolean inputs in nested style for label non-string. @feliperenan
- Updated gem dependency to support Rails 5.1.x.
- Removed Ruby 2.4.0
Integerunification deprecation warning. - Removed EOL Ruby 1.9.3 from the build matrix.
- Added
minlengthcomponent. boolean_label_classcan be set on a per-input basis.
- Fix support for symbols when looking up types with
ActiveModel::Type.
- Add the
aria-invalidattribute on inputs with errors. - Added support for the new
ActiveModel::TypeAPI over Active Record's column objects.
- Fix
merge_wrapper_optionsto correctly merge options with duplicated keys. @herminiotorres Closes #1278.
- Updated gem dependency to support Rails 5.0.x.
- Improve performance of input generation by disabling support for
_htmltranslations. This reverts the feature introduced on the 3.1.0 branch
- Add the
disabled_classto the label when the input is disabled. @rhodrid
-
Make it possible to override
requiredvalue that was previously set in the wrapper. @nashby -
date/time/datetimeinputs now correctly generate the labelforattribute when HTML5 compatibility is explicitly enabled. @ericsullivan -
The datetime, date, and time inputs now have a nice format by default on bootstrap. @ulissesalmeida @eltonchrls
-
Now it is possible to set custom input mappings for collections.
Example:
# On configuration:
config.input_mappings = { /gender$/ => :check_boxes }
# On form:
f.input :gender, collection: [:male, :female]- Update foundation generator to version 5. @jorge-d
- Add mapping to
uuidcolumns. - Add custom namespaces for custom inputs feature. @vala
- Add
:unless_blankoption to the wrapper API. @IanVaughan - Add support to html markup in the I18n options. @laurocaetano
- Add the
full_errorcomponent. @laurocaetano - Add support to
scopeto be used on associations. @laurocaetano - Execute the association
conditionin the object context. @laurocaetano - Check if the given association responds to
orderbefore calling it. @laurocaetano - Add Bootstrap 3 initializer template.
- For radio or checkbox collection always use
:item_wrapper_tagto wrap the content and addlabelwhen usingboolean_stylewith:nested@kassio and @erichkist input_fielduses the same wrapper as input but only with attribute components. @nashby- Add wrapper mapping per form basis @rcillo and @bernardoamc
- Add
forattribute tolabelwhen collections are rendered as radio or checkbox @erichkist, @ulissesalmeida and @fabioyamate - Add
include_default_input_wrapper_classconfig @luizcosta - Map
datetime,dateandtimeinput types to their respective HTML5 input tags when the:html5is set totrue@volmer - Add
boolean_label_classconfig. - Add
:htmloption to include additional attributes on custom wrappers @remofritzsche and @ulissesalmeida - Make possible to use the Wrappers API to define attributes for the components. See #997 for more information.
- Put a whitespace before the
inline_labeloptions of boolean input if it is present. - Add support to configure the
label_textproc at the wrapper level. @NOX73 label_textproc now receive three arguments (label, request, and if the label was explicit). @timscott- Add I18n support to
:include_blankand:promptwhen:translateis used as value. @haines - Add support to define custom error messages for the attributes.
- Add support to change the I18n scope to be used in Simple Form. @nielsbuus
- The default form class can now be overridden with
html: { :class }. @rmm5t
- Fix
full_errorwhen the attribute is an association. @mvdamme - Fix support to
:namespaceand:indexoptions for nested check boxes and radio buttons when the attribute is an association. - Collection input that uses automatic collection translation properly sets checked values. Closes #971 @nashby
- Collection input generates
requiredattribute if it haspromptoption. @nashby - Grouped collection uses the first non-empty object to detect label and value methods.
- Methods on custom inputs now accept a required argument with the wrapper options. See #997 for more information.
- SimpleForm.form_class is deprecated in favor of SimpleForm.default_form_class.
Future versions of Simple Form will not generate
simple_formclass for the form element. See #1109 for more information.
Please check v3.0 for previous changes.