Class: ActiveModel::Serializer::Adapter::FlattenJson

Inherits:
Json show all
Defined in:
lib/active_model/serializer/adapter/flatten_json.rb

Constant Summary

Constants inherited from ActiveModel::Serializer::Adapter

UnknownAdapterError

Instance Attribute Summary

Attributes inherited from ActiveModel::Serializer::Adapter

#serializer

Instance Method Summary collapse

Methods inherited from Json

#fragment_cache

Methods inherited from ActiveModel::Serializer::Adapter

adapter_class, adapter_map, adapters, #as_json, create, find_by_name, #fragment_cache, inherited, #initialize, lookup, register

Constructor Details

This class inherits a constructor from ActiveModel::Serializer::Adapter

Instance Method Details

#serializable_hash(options = {}) ⇒ Object



2
3
4
# File 'lib/active_model/serializer/adapter/flatten_json.rb', line 2

def serializable_hash(options = {})
  super.each_value.first
end