From 1575d8cbaa9191f65c6876277f15c7e6370cc34a Mon Sep 17 00:00:00 2001 From: "max.jos" <48556853+yhru@users.noreply.github.com> Date: Thu, 4 Jan 2024 09:58:37 +0000 Subject: [PATCH] feat: add coder to serialize --- lib/public_activity/orm/active_record/activity.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/public_activity/orm/active_record/activity.rb b/lib/public_activity/orm/active_record/activity.rb index dd33983..e807189 100644 --- a/lib/public_activity/orm/active_record/activity.rb +++ b/lib/public_activity/orm/active_record/activity.rb @@ -39,7 +39,7 @@ class Activity < ::ActiveRecord::Base # Serialize parameters Hash begin if table_exists? - serialize :parameters, Hash unless %i[json jsonb hstore].include?(columns_hash['parameters'].type) + serialize :parameters, coder: YAML, type: Hash unless %i[json jsonb hstore].include?(columns_hash['parameters'].type) else warn("[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization") end