Class: ActiveRecord::Associations::Builder::HasAndBelongsToMany

Inherits:
CollectionAssociation show all
Defined in:
lib/active_record/associations/builder/has_and_belongs_to_many.rb

Overview

:nodoc:

Constant Summary

Constants inherited from CollectionAssociation

CollectionAssociation::CALLBACKS

Instance Attribute Summary

Attributes inherited from CollectionAssociation

#block_extension

Attributes inherited from Association

#model, #name, #options, #reflection

Instance Method Summary collapse

Methods inherited from CollectionAssociation

build, #initialize, #writable?

Methods inherited from Association

build, #initialize

Constructor Details

This class inherits a constructor from ActiveRecord::Associations::Builder::CollectionAssociation

Instance Method Details

#buildObject



7
8
9
10
11
12
# File 'lib/active_record/associations/builder/has_and_belongs_to_many.rb', line 7

def build
  reflection = super
  check_validity(reflection)
  define_destroy_hook
  reflection
end