Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix serialize method for Rails 7.1.2 compatibility #384

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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
Expand Down