Flowdock
method

new

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Association
new(klass, owners, reflection, preload_scope, associate_by_default = true) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/preloader/association.rb, line 7
        def initialize(klass, owners, reflection, preload_scope, associate_by_default = true)
          @klass         = klass
          @owners        = owners.uniq(&:__id__)
          @reflection    = reflection
          @preload_scope = preload_scope
          @associate     = associate_by_default || !preload_scope || preload_scope.empty_scope?
          @model         = owners.first && owners.first.class
        end
Register or log in to add new notes.