mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
13 lines
361 B
Ruby
13 lines
361 B
Ruby
class ActiveModel::Serializer::Adapter::FlattenJson < ActiveModel::Serializer::Adapter::Json
|
|
def serializable_hash(options = {})
|
|
super.each_value.first
|
|
end
|
|
|
|
private
|
|
|
|
# no-op: FlattenJson adapter does not include meta data, because it does not support root.
|
|
def include_meta(json)
|
|
json
|
|
end
|
|
end
|