123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::Associations::Builder::HasMany

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActiveRecord::Associations::Builder::CollectionAssociation
Defined in: activerecord/lib/active_record/associations/builder/has_many.rb

Constant Summary

Association - Inherited

VALID_OPTIONS

CollectionAssociation - Inherited

CALLBACKS

Class Attribute Summary

Association - Inherited

Class Method Summary

Class Method Details

.macro (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/associations/builder/has_many.rb', line 5

def self.macro
  :has_many
end

.valid_dependent_options (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/associations/builder/has_many.rb', line 17

def self.valid_dependent_options
  [:destroy, :delete_all, :nullify, :restrict_with_error, :restrict_with_exception, :destroy_async]
end

.valid_options(options) (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/associations/builder/has_many.rb', line 9

def self.valid_options(options)
  valid = super + [:counter_cache, :join_table, :index_errors, :as, :through]
  valid += [:foreign_type] if options[:as]
  valid += [:source, :source_type, :disable_joins] if options[:through]
  valid += [:ensuring_owner_was] if options[:dependent] == :destroy_async
  valid
end