Module: Mongoid::Association::Macros

Extended by:
ActiveSupport::Concern
Included in:
Mongoid::Association
Defined in:
build/mongoid-master/lib/mongoid/association/macros.rb

Overview

This module contains the core macros for defining associations between documents. They can be either embedded or referenced.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#associationsHash

This is convenience for libraries still on the old API.

Examples:

Get the associations.

person.associations

Returns:

  • (Hash)

    The associations.

Since:

  • 2.3.1



29
30
31
# File 'build/mongoid-master/lib/mongoid/association/macros.rb', line 29

def associations
  self.relations
end