Browse Source

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

master
Eugen Rochko 7 years ago
committed by GitHub
parent
commit
881856553e
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/lib/activitypub/adapter.rb

+ 2
- 2
app/lib/activitypub/adapter.rb 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

Loading…
Cancel
Save