Skip to content

Commit

Permalink
Resolve deprecations around serializtion for Rails 7.1
Browse files Browse the repository at this point in the history
This commit just makes the code compatible with Rails 7.1 while preserving the original default behavior.
  • Loading branch information
oboxodo committed Jan 16, 2025
1 parent 6a02ece commit e0dcbc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/public_activity/orm/active_record/activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Activity < ::ActiveRecord::Base
# Serialize parameters Hash
begin
if table_exists?
serialize :parameters, Hash unless [:json, :jsonb, :hstore].include?(columns_hash['parameters'].type)
serialize :parameters, type: Hash, coder: YAML unless [:json, :jsonb, :hstore].include?(columns_hash['parameters'].type)
else
warn("[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization")
end
Expand Down

0 comments on commit e0dcbc3

Please sign in to comment.