def preload_method
      @preload_method ||= begin
        if Gem.loaded_specs['activerecord'].version >= Gem::Version.create('4.1')
          ActiveRecord::Associations::Preloader.new.method(:preload)
        else
          Proc.new do |models, association_names|
            ActiveRecord::Associations::Preloader.new(models, association_names).run
          end
        end
      end
    end
def preload_method
      @preload_method ||= begin
        if Gem.loaded_specs['activerecord'].version >= Gem::Version.create('4.1')
          ActiveRecord::Associations::Preloader.new.method(:preload)
        else
          Proc.new do |models, association_names|
            ActiveRecord::Associations::Preloader.new(models, association_names).run
          end
        end
      end
    end
Returns a proc that takes two arguments, +models+ and +association_names+,
 which, when called, preloads those.

 @return [Proc] A callable proc