Flowdock
method

records_by_reflection

Importance_0
v3.2.3 - Show latest stable - 0 notes - Class: Preloader
records_by_reflection(association) 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 141
      def records_by_reflection(association)
        records.group_by do |record|
          reflection = record.class.reflections[association]

          unless reflection
            raise ActiveRecord::ConfigurationError, "Association named '#{association}' was not found; "                                                      "perhaps you misspelled it?"
          end

          reflection
        end
      end
Register or log in to add new notes.