Class: ActiveModel::Serializer::Null

Inherits:
ActiveModel::Serializer show all
Defined in:
lib/active_model/serializer/null.rb

Constant Summary

Constant Summary

Constants inherited from ActiveModel::Serializer

VERSION

Constants included from Caching

Caching::CALLER_FILE

Constants included from Associations

Associations::DEFAULT_INCLUDE_TREE

Instance Attribute Summary

Attributes inherited from ActiveModel::Serializer

#object, #root, #scope

Instance Method Summary (collapse)

Methods inherited from ActiveModel::Serializer

adapter, #as_json, get_serializer_for, #initialize, #json_key, #read_attribute_for_serialization, serializer_for, serializer_lookup_chain_for, serializers_cache, #success?

Methods included from ActiveModelSerializers::Deprecate

delegate_and_deprecate, deprecate

Constructor Details

This class inherits a constructor from ActiveModel::Serializer

Instance Method Details

- (Object) associations



8
9
10
# File 'lib/active_model/serializer/null.rb', line 8

def associations(*)
  {}
end

- (Object) attributes



4
5
6
# File 'lib/active_model/serializer/null.rb', line 4

def attributes(*)
  {}
end

- (Object) serializable_hash



12
13
14
# File 'lib/active_model/serializer/null.rb', line 12

def serializable_hash(*)
  {}
end