method
preloader_for
v3.1.0 -
Show latest stable
- Class:
ActiveRecord::Associations::Preloader
preloader_for(reflection)private
No documentation available.
# File activerecord/lib/active_record/associations/preloader.rb, line 163
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