ar_lazy_preload 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f5333ce93f4dabe64d5f71e9c838c883a7a40f859cec39b80eb60b60f7e0dea
|
4
|
+
data.tar.gz: 7795be2e1dc2f6661deeb3b5a014de62b927004c40911ee6dab0299d493efd56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a96f77158652b6cd1923c6e48f7f068f0d12950ad918718229b0bb2763c4c90183a6dadfdcff043be84a5eb06129efa199530648c009c326f0415616658b7d6
|
7
|
+
data.tar.gz: e3aadc85c581e91a17642547e2527f0b210e4a899f2bb0be2d77c2589fd9016fe811910af53232bf222bf223312261b38a6a1d7b29ff9e85a8efd94b8e49990c
|
@@ -16,6 +16,7 @@ module ArLazyPreload
|
|
16
16
|
|
17
17
|
def setup_preloading_context
|
18
18
|
return if lazy_preload_context.nil?
|
19
|
+
return if lazy_preload_context.association_tree.nil?
|
19
20
|
|
20
21
|
association_tree_builder = AssociationTreeBuilder.new(lazy_preload_context.association_tree)
|
21
22
|
subtree = association_tree_builder.subtree_for(reflection.name)
|
@@ -19,6 +19,9 @@ module ArLazyPreload
|
|
19
19
|
@records.each { |record| record.lazy_preload_context = self }
|
20
20
|
end
|
21
21
|
|
22
|
+
# @api
|
23
|
+
def association_tree; nil; end
|
24
|
+
|
22
25
|
# This method checks if the association should be loaded and preloads it for all
|
23
26
|
# objects in the context it if needed.
|
24
27
|
def try_preload_lazily(association_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ar_lazy_preload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DmitryTsepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|