Lockbox uses serialize active record api here, which checks for configured coder and raises an error if it's not here, which results in errors when using type: :array with Rails 7.1.x with its defaults.
but ideally it's needed to pass coder to serialize everywhere.
Moreover, lockbox tests are still passing because, as it seems, rails configuration is applied during booting process and lockbox tests aren't doing that
Rails 7.1 introduced a new config field for active record -
config.active_record.default_column_serializer
when introducing "Allow to define the default column serializer" which isnil
by default (see here).Lockbox uses
serialize
active record api here, which checks for configured coder and raises an error if it's not here, which results in errors when usingtype: :array
with Rails 7.1.x with its defaults.Temporary solution is to use YAML serializer:
config/application.rb
but ideally it's needed to pass coder to
serialize
everywhere.Moreover, lockbox tests are still passing because, as it seems, rails configuration is applied during booting process and lockbox tests aren't doing that