Class: ActiveRecord::Associations::HasManyAssociation

Inherits:
AssociationCollection show all
Defined in:
lib/active_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.

Direct Known Subclasses

HasManyThroughAssociation

Instance Method Summary collapse

Methods inherited from AssociationCollection

#<<, #any?, #build, #clear, #count, #create, #create!, #delete, #delete_all, #destroy, #destroy_all, #empty?, #find, #first, #include?, #last, #length, #many?, #proxy_respond_to?, #replace, #reset, #scoped, #select, #size, #sum, #to_ary, #transaction, #uniq

Methods inherited from AssociationProxy

#===, #aliased_table_name, #conditions, #inspect, #loaded, #loaded?, #proxy_owner, #proxy_reflection, #proxy_respond_to?, #proxy_target, #reload, #reset, #respond_to?, #send, #target, #target=

Constructor Details

#initialize(owner, reflection) ⇒ HasManyAssociation

:nodoc:



9
10
11
12
# File 'lib/active_record/associations/has_many_association.rb', line 9

def initialize(owner, reflection)
  @finder_sql = nil
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveRecord::Associations::AssociationCollection