mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-27 20:41:45 +01:00
Fix Style/HashSlice
cop violations (#33720)
This commit is contained in:
parent
469c8f8db1
commit
f73df1f2b0
@ -17,7 +17,7 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
|
|||||||
|
|
||||||
options = serialization_options(options)
|
options = serialization_options(options)
|
||||||
serialized_hash = serializer.serializable_hash(options.merge(named_contexts: named_contexts, context_extensions: context_extensions))
|
serialized_hash = serializer.serializable_hash(options.merge(named_contexts: named_contexts, context_extensions: context_extensions))
|
||||||
serialized_hash = serialized_hash.select { |k, _| options[:fields].include?(k) } if options[:fields]
|
serialized_hash = serialized_hash.slice(*options[:fields]) if options[:fields]
|
||||||
serialized_hash = self.class.transform_key_casing!(serialized_hash, instance_options)
|
serialized_hash = self.class.transform_key_casing!(serialized_hash, instance_options)
|
||||||
|
|
||||||
{ '@context': serialized_context(named_contexts, context_extensions) }.merge(serialized_hash)
|
{ '@context': serialized_context(named_contexts, context_extensions) }.merge(serialized_hash)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user