class ActiveRecord::Associations::Preloader::AlreadyLoaded - activerecord-4.2.3 Documentation

# class ActiveRecord::Associations::Preloader::AlreadyLoaded

### Attributes

owners[R]
reflection[R]

### Public Class Methods

new(klass, owners, reflection, preload_scope) click to toggle source

    # File lib/active_record/associations/preloader.rb, line 166
    def initialize(klass, owners, reflection, preload_scope)
      @owners = owners
      @reflection = reflection
    end

### Public Instance Methods

preloaded_records() click to toggle source

    # File lib/active_record/associations/preloader.rb, line 173
    def preloaded_records
      owners.flat_map { |owner| owner.association(reflection.name).target }
    end

run(preloader) click to toggle source

    # File lib/active_record/associations/preloader.rb, line 171
    def run(preloader); end