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:
self,
CollectionAssociation ,
Association
|
|
Instance Chain:
self,
CollectionAssociation ,
Association
|
|
Inherits: |
ActiveRecord::Associations::Builder::CollectionAssociation
|
Defined in: | activerecord/lib/active_record/associations/builder/has_many.rb |
Constant Summary
Class Attribute Summary
Association
- Inherited
Class Method Summary
- .macro private
- .valid_dependent_options private
- .valid_options(options) private
CollectionAssociation
- Inherited
.define_callbacks, .define_callback, .define_extensions, | |
.define_readers | Defines the setter and getter methods for the collection_singular_ids. |
.define_writers, .valid_options |
Association
- Inherited
.build, .create_reflection, .add_after_commit_jobs_callback, .add_destroy_callbacks, .build_scope, .check_dependent_options, | |
.define_accessors | Defines the setter and getter methods for the association class Post < |
.define_callbacks, .define_change_tracking_methods, .define_extensions, .define_readers, .define_validations, .define_writers, .macro, .valid_dependent_options, .valid_options, .validate_options |
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. [: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 = super + [:counter_cache, :join_table, :index_errors, :as, :through] valid += [:foreign_type] if [:as] valid += [:source, :source_type, :disable_joins] if [:through] valid += [:ensuring_owner_was] if [:dependent] == :destroy_async valid end