Flowdock
method

preloader_for

Importance_0
v3.2.13 - Show latest stable - 0 notes - Class: Preloader
preloader_for(reflection) 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 167
      def preloader_for(reflection)
        case reflection.macro
        when :has_many
          reflection.options[:through] ? HasManyThrough : HasMany
        when :has_one
          reflection.options[:through] ? HasOneThrough : HasOne
        when :has_and_belongs_to_many
          HasAndBelongsToMany
        when :belongs_to
          BelongsTo
        end
      end
Register or log in to add new notes.