Class: DuckRecord::Associations::HasManyAssociation
- Inherits:
-
CollectionAssociation
- Object
- Association
- CollectionAssociation
- DuckRecord::Associations::HasManyAssociation
- Includes:
- ForeignAssociation
- Defined in:
- lib/duck_record/associations/has_many_association.rb
Overview
This is the proxy that handles a has many association.
If the association has a :through option further specialization is provided by its child HasManyThroughAssociation.
Instance Attribute Summary
Attributes inherited from Association
Instance Method Summary collapse
Methods included from ForeignAssociation
Methods inherited from CollectionAssociation
#add_to_target, #build, #concat, #delete, #delete_all, #destroy, #destroy_all, #empty?, #find, #find_from_target?, #ids_reader, #ids_writer, #include?, #load_target, #null_scope?, #reader, #replace, #reset, #scope, #size, #transaction, #writer
Methods inherited from Association
#aliased_table_name, #association_scope, #create, #create!, #extensions, #initialize, #initialize_attributes, #interpolate, #klass, #load_target, #loaded!, #loaded?, #marshal_dump, #marshal_load, #reload, #remove_inverse_instance, #reset, #reset_scope, #scope, #set_inverse_instance, #stale_target?, #target_scope
Constructor Details
This class inherits a constructor from DuckRecord::Associations::Association
Instance Method Details
#insert_record(record, validate = true, raise = false) ⇒ Object
11 12 13 14 |
# File 'lib/duck_record/associations/has_many_association.rb', line 11 def insert_record(record, validate = true, raise = false) set_owner_attributes(record) super end |