1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-28 14:58:38 +09:00

Fix #4894 - Merge context hash into final JSON hash after key transform (#4898)

This commit is contained in:
Eugen Rochko 2017-09-12 00:16:18 +02:00 committed by GitHub
parent 0a6b098668
commit 881856553e

View File

@ -28,7 +28,7 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
def serializable_hash(options = nil)
options = serialization_options(options)
serialized_hash = CONTEXT.merge(ActiveModelSerializers::Adapter::Attributes.new(serializer, instance_options).serializable_hash(options))
self.class.transform_key_casing!(serialized_hash, instance_options)
serialized_hash = ActiveModelSerializers::Adapter::Attributes.new(serializer, instance_options).serializable_hash(options)
CONTEXT.merge(self.class.transform_key_casing!(serialized_hash, instance_options))
end
end