Class: DatastaxRails::Associations::Builder::BelongsTo

Inherits:
SingularAssociation show all
Defined in:
lib/datastax_rails/associations/builder/belongs_to.rb

Overview

Builds a belongs_to relation to another model. This is specified on the side of the relationship that contains the foreign key.

Instance Attribute Summary

Attributes inherited from Association

#model, #name, #options, #reflection

Instance Method Summary collapse

Methods inherited from SingularAssociation

#constructable?, #define_accessors

Methods inherited from Association

build, #initialize, #mixin

Constructor Details

This class inherits a constructor from DatastaxRails::Associations::Builder::Association

Instance Method Details

#buildObject


8
9
10
11
12
# File 'lib/datastax_rails/associations/builder/belongs_to.rb', line 8

def build
  reflection = super
  configure_dependency
  reflection
end