module ActiveRecord::Precount::Builder::HasManyExtension

Public Instance Methods

build(model, name, scope, options, &block) click to toggle source
Calls superclass method
# File lib/active_record/precount/has_many_extension.rb, line 12
def build(model, name, scope, options, &block)
  if scope.is_a?(Hash)
    options = scope
    scope   = nil
  end

  if options[:count_loader]
    CountLoaderBuilder.new(model).build_from_has_many(name, scope, options)
  end
  super
end
valid_options(*) click to toggle source
Calls superclass method
# File lib/active_record/precount/has_many_extension.rb, line 7
def valid_options(*)
  super + [:count_loader]
end