From fb0712db3f3e2cc248aae11ccf3c7b70d4d638fd Mon Sep 17 00:00:00 2001 From: Joe Haig Date: Sat, 29 Jun 2024 16:39:37 +0100 Subject: [PATCH] Pass coder to serialize as keyword argument Passing coder to serialize as a positional argument is deprecated and will cause errors in Active Record after 7.1. --- CHANGELOG.md | 1 + spec/support/models.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a41ca4a..eb2dec8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Drop support for Rails 5.2, Ruby 2.5 and 2.6. [https://github.com/amoeba-rb/amoeba/pull/120] * Notes on contributing. Github Actions for automate tests. [https://github.com/amoeba-rb/amoeba/pull/124] +* Fix tests for Active Record after 7.1. [https://github.com/amoeba-rb/amoeba/pull/127] ### 3.3.0 diff --git a/spec/support/models.rb b/spec/support/models.rb index b624c6d..dfa96cb 100644 --- a/spec/support/models.rb +++ b/spec/support/models.rb @@ -110,7 +110,7 @@ def self.dump(int_array) end end - serialize :value, ArrayPack + serialize :value, coder: ArrayPack before_create :hydrate_me