Module: ActiveRecord::Precount::Builder::HasManyExtension
- Defined in:
- lib/active_record/precount/has_many_extension.rb
Instance Method Summary collapse
Instance Method Details
#build(model) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/active_record/precount/has_many_extension.rb', line 12 def build(model, name, scope, , &block) if scope.is_a?(Hash) = scope scope = nil end if [:count_loader] CountLoaderBuilder.new(model).build_from_has_many(name, scope, ) end super end |
#valid_options ⇒ Object
7 8 9 |
# File 'lib/active_record/precount/has_many_extension.rb', line 7 def (*) super + [:count_loader] end |