Sha256: d43440ee4357b036d5b13430e547e0b2062e07f09e14d8bcd7090ad3b882a3be

Contents?: true

Size: 591 Bytes

Versions: 36

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true

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

    def self.valid_options(options)
      super + [:primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :counter_cache, :join_table, :foreign_type, :index_errors]
    end

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

    private_class_method :macro, :valid_options, :valid_dependent_options
  end
end

Version data entries

36 entries across 36 versions & 4 rubygems

Version Path
activerecord-6.0.6.1 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.6 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.5.1 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.5 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4.8 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4.7 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4.6 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4.5 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4.4 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4.3 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4.2 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4.1 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.4 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.3.7 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.3.6 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.3.5 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.3.4 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.3.3 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.3.2 lib/active_record/associations/builder/has_many.rb
activerecord-6.0.3.1 lib/active_record/associations/builder/has_many.rb