Module: JitPreloader
- Defined in:
- lib/jit_preloader.rb,
lib/jit_preloader/version.rb,
lib/jit_preloader/preloader.rb,
lib/jit_preloader/active_record/relation.rb,
lib/jit_preloader/active_record/associations/preloader/ar7_branch.rb,
lib/jit_preloader/active_record/associations/singular_association.rb,
lib/jit_preloader/active_record/associations/collection_association.rb,
lib/jit_preloader/active_record/associations/preloader/ar6_association.rb,
lib/jit_preloader/active_record/associations/preloader/ar7_association.rb
Defined Under Namespace
Modules: ActiveRecordAssociationsCollectionAssociation, ActiveRecordAssociationsSingularAssociation, ActiveRecordRelation, PreloaderAssociation, PreloaderBranch
Classes: Preloader
Constant Summary
collapse
- VERSION =
"3.0.0"
Class Method Summary
collapse
Class Method Details
.globally_enabled=(value) ⇒ Object
23
24
25
|
# File 'lib/jit_preloader.rb', line 23
def self.globally_enabled=(value)
@enabled = value
end
|
.globally_enabled? ⇒ Boolean
37
38
39
40
41
42
43
|
# File 'lib/jit_preloader.rb', line 37
def self.globally_enabled?
if @enabled && @enabled.respond_to?(:call)
@enabled.call
else
@enabled
end
end
|
.max_ids_per_query ⇒ Object
33
34
35
|
# File 'lib/jit_preloader.rb', line 33
def self.max_ids_per_query
@max_ids_per_query
end
|
.max_ids_per_query=(max_ids) ⇒ Object
27
28
29
30
31
|
# File 'lib/jit_preloader.rb', line 27
def self.max_ids_per_query=(max_ids)
if max_ids && max_ids >= 1
@max_ids_per_query = max_ids
end
end
|