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

Inherits:
CollectionAssociation show all
Defined in:
lib/active_record/associations/builder/has_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

#name, #options, #scope

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CollectionAssociation

define_callback, define_callbacks, #define_extensions, define_readers, define_writers, #initialize

Methods inherited from Association

build, #build, create_builder, define_accessors, define_callbacks, #define_extensions, define_readers, define_writers, #initialize, #validate_options

Constructor Details

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

Class Method Details

.valid_dependent_optionsObject



11
12
13
# File 'lib/active_record/associations/builder/has_many.rb', line 11

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

Instance Method Details

#macroObject



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

def macro
  :has_many
end

#valid_optionsObject



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

def valid_options
  super + [:primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :counter_cache, :join_table]
end