aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/lib/active_record/associations/builder/has_many.rb
blob: a60cb4769ac47cdbb7d2e0f6f14469ec1ddc4d9b (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                


               
 
                     
                                                                                                           
       
 
                               
                                                                                       
       

     
module ActiveRecord::Associations::Builder
  class HasMany < CollectionAssociation #:nodoc:
    def macro
      :has_many
    end

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

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