Sha256: cd5f1eaacefddc57e42d3fc438de468552f0ff0a85bf900195864232a4178226

Contents?: true

Size: 363 Bytes

Versions: 6

Compression:

Stored size: 363 Bytes

Contents

module ActiveRecord
  module Precount
    module PreloaderExtension
      def preloader_for(reflection, owners, rhs_klass)
        preloader = super(reflection, owners, rhs_klass)
        return preloader if preloader

        case reflection.macro
        when :count_loader
          Associations::Preloader::CountLoader
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activerecord-precount-0.5.1 lib/active_record/precount/preloader_extension.rb
activerecord-precount-0.5.0 lib/active_record/precount/preloader_extension.rb
activerecord-precount-0.4.3 lib/active_record/precount/preloader_extension.rb
activerecord-precount-0.4.2 lib/active_record/precount/preloader_extension.rb
activerecord-precount-0.4.1 lib/active_record/precount/preloader_extension.rb
activerecord-precount-0.4.0 lib/active_record/precount/preloader_extension.rb