Flowdock
method

grouped_records

Importance_0
Ruby on Rails latest stable (v4.1.8) - 0 notes - Class: Preloader
grouped_records(association, records) private

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.rb, line 143
      def grouped_records(association, records)
        h = {}
        records.each do |record|
          next unless record
          assoc = record.association(association)
          klasses = h[assoc.reflection] ||= {}
          (klasses[assoc.klass] ||= []) << record
        end
        h
      end
Register or log in to add new notes.