- [BREAKING] Drop support for Rails < 7.2 and Ruby < 3.3
- [BREAKING] Remove Rails < 7.2 compatibility branches for error handling in
RepresentationandNestedValidator - Add support for Rails 7.2, 8.0, and 8.1
- Remove Guard gems and Guardfile
- Update RuboCop configuration and resolve offenses
- Introduces
mass_assignment_strict_modeconfiguration option to control the behavior of mass assignment.- The setting is per class and configures strict handling of unknown attributes by raising an exception.
- By default it is disabled, and you need to opt-in.
- #32
- Fix crash when mapping PostgreSQL enum to ruby variable in #28
- Lower severity of the log message during mass assignment #26
- Support for ruby 3.2 by @konalegi in #22
- Fix deprecated #to_s method by @mpiask in #24
- Support for Rails 7.1 by @ojab in #25
- [BREAKING] Drop support for Rails < 6.0 by @ojab in #25
- [BREAKING] Drop support for taking
modelas first argument in default/readonly/enum/normalize. This means thatdefault: -> (model) { model.other_field}is no longer supported and should be replaced withdefault: -> { other_field }. - Add support for evaluating
Symbolfor readonly/enum/normalize. If symbol is passed in one of those options, method with that name will be called when evaluating the value. - [BREAKING] Remove
localizedattribute type. - [BREAKING] Change the behavior of
defaultandnormalizeforcollection&dictionary. Instead of acting per element they will now act on the attribute as a whole.- E.g.
collection :numbers, default: [1, 2, 3]will not set the default for the whole collection ofnumbersrather than each element innumbers.
- E.g.
- [BREAKING] Stop automatically saving
references_one/references_manywhen applying changes. - [BREAKING] Removed Lifecycle module.
embeds_many/embeds_oneobjects can no longer be created/saved/updated/destroyed. - [BREAKING] Due to changes above
accepts_nested_attributes_forforembeds_many/embeds_oneassociations no longer marks objects for destruction but simply removes them, making changes instantly. - Drop support for ruby 2.3 and rails 4.2
- Replace typecasters with proper type definitions.
- Instead of
typecaster(type) { |value, _| ... }you'll have to usetypecaster(type) { |value| ... }. - Consequently you can access type definition in typecaster, e.g.
typecaster('Object') { |value| value if value.class < type }, heretypecomes from type definition.
- Instead of
- Fixed represented error message copying when represented model uses symbols for
message.
- Forked from ActiveData, see https://github.com/pyromaniac/active_data/blob/v1.2.0/CHANGELOG.md for changes before this