diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-09-12 00:16:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 00:16:18 +0200 |
commit | 881856553e0c2ba96cbe20ed7bbbbd02b4c60ef4 (patch) | |
tree | 96fb43615c30751c03a35891772c5e9047a98075 | |
parent | 0a6b0986685e6a54042b22ae01df4dd0aad9f6b0 (diff) |
Fix #4894 - Merge context hash into final JSON hash after key transform (#4898)
-rw-r--r-- | app/lib/activitypub/adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/adapter.rb b/app/lib/activitypub/adapter.rb index 6ed66a239..3228a3f03 100644 --- a/app/lib/activitypub/adapter.rb +++ b/app/lib/activitypub/adapter.rb @@ -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 |