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: 122262e10bed3d8a2793e62f24ee39e7a01453933c68d8faffce8945b794a522
4
- data.tar.gz: e50652dd855cbbbe39b292b20e07fca7f43ba660fd2f28f0c41de1fa0595c281
3
+ metadata.gz: 0f5333ce93f4dabe64d5f71e9c838c883a7a40f859cec39b80eb60b60f7e0dea
4
+ data.tar.gz: 7795be2e1dc2f6661deeb3b5a014de62b927004c40911ee6dab0299d493efd56
5
5
  SHA512:
6
- metadata.gz: 97a5044a80f021ea4f4c0bd0b27b0881858371bb60051014f885c791570346bafae8c2e4110f5f492817cbe38d44c551a4045d886a67e1ede30a5af5079afdac
7
- data.tar.gz: '0458891f44c12464f6ce33295c6ef4e20bf55df63dc81a46ad840401cb47f1a782c466ee87f4c44c965b5090bc1c02ed2bead8a90f9b5031f9665803ade8e0a6'
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ArLazyPreload
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
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.0
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-27 00:00:00.000000000 Z
11
+ date: 2020-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails