ActiveInteraction v4.0.0 Release Notes
Release Date: 2021-01-10 // over 3 years ago-
🔄 Changed
- ⬇️ drop support for Ruby < 2.5, added support for Ruby 3.0
- ⬇️ drop support for Rails < 5.0, added support for Rails 6.1
- 🚚 [#398][] - Predicate methods have been removed. (how to upgrade)
- [#412][] - Filters will now treat blank string values as
nil
(exceptstring
andsymbol
). (how to upgrade) - 0️⃣ [#392][] - Integer parsing now defaults the base to 10. (how to upgrade)
- The
inputs
method now returns anActiveInteraction::Input
instead of a hash. TheActiveInteraction::Input
class still responds to all hash methods. - The
object
andrecord
filters now only accept an instance of the correct class type or a subclass of the correct class. They no longer allow you to check for included modules. (how to upgrade) - The
interface
filter will now look for an ancestor of the value passed based on the name of the interface or the value passed in thefrom
option. - The
InvalidClassError
has been replaced byInvalidNameError
. - When introspecting an array filter, the inner filter is referenced by :'0' instead of the singularized version of the array filter name.
➕ Added
- Implicit coercion of types are now supported in filters (e.g.
to_str
,to_int
, etc). - The
interface
andrecord
filters, when used as an inner filter for anarray
, will have theirfrom/class
option set to a singularized version of thearray
filter name.
⬆️ Upgrading
Predicate Methods
🚚 We've removed the predicate methods that were automatically generated for each input. They would return true if an input was not
nil
. They can be manually replaced with that same check.