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