Class: ActiveModel::Serializer::Association

Inherits:
Field
  • Object
show all
Defined in:
lib/active_model/serializer/association.rb

Overview

This class holds all information about serializer’s association.

Examples:

Association.new(:comments, { serializer: CommentSummarySerializer })

Instance Attribute Summary collapse

Attributes inherited from Field

#block

Method Summary

Methods inherited from Field

#excluded?, #initialize, #value

Constructor Details

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

Instance Attribute Details

#nameSymbol



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

def name
  @name
end

#optionsHash{Symbol => Object}



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

def options
  @options
end