ActiveInteraction v4.0.0 Release Notes

Release Date: 2021-01-10 // 10 months 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 (except string and symbol). (how to upgrade)
    • 0️⃣ [#392][] - Integer parsing now defaults the base to 10. (how to upgrade)
    • The inputs method now returns an ActiveInteraction::Input instead of a hash. The ActiveInteraction::Input class still responds to all hash methods.
    • The object and record 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 the from option.
    • The InvalidClassError has been replaced by InvalidNameError.
    • 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 and record filters, when used as an inner filter for an array, will have their from/class option set to a singularized version of the array 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.