goldiloader 2.1.1 → 2.1.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7414c0de13b4e9b5c87d8106cedfdb2028a3640
|
4
|
+
data.tar.gz: 2a0650488a2ebdc94d665fa12b3dc7d88282c791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46d11df02dbae98f7915b06df38937ba93937671433403ff1f161def9568b92cb1a310eb55eed6c9edb073e5851660bb890d7c324cafca12c99585d269ebd0e9
|
7
|
+
data.tar.gz: '09179806ac8786f88f059d0c3cba83c4a85acd7f9fe1794dca06ac6672da948b854264263c709911425689493c2932d7f242504a2b0d0d5f9818d0487b58da17'
|
@@ -100,6 +100,7 @@ module Goldiloader
|
|
100
100
|
association_info = Goldiloader::AssociationInfo.new(self)
|
101
101
|
!association_info.limit? &&
|
102
102
|
!association_info.offset? &&
|
103
|
+
(!association_info.has_one? || !association_info.order?) &&
|
103
104
|
(!association_info.group? || ::Goldiloader::Compatibility.group_eager_loadable?) &&
|
104
105
|
(!association_info.from? || ::Goldiloader::Compatibility.from_eager_loadable?) &&
|
105
106
|
!association_info.instance_dependent? &&
|
@@ -9,6 +9,10 @@ module Goldiloader
|
|
9
9
|
|
10
10
|
delegate :association_scope, :reflection, to: :@association
|
11
11
|
|
12
|
+
def has_one?
|
13
|
+
reflection.has_one?
|
14
|
+
end
|
15
|
+
|
12
16
|
def offset?
|
13
17
|
association_scope && association_scope.offset_value.present?
|
14
18
|
end
|
@@ -33,6 +37,10 @@ module Goldiloader
|
|
33
37
|
association_scope && association_scope.group_values.present?
|
34
38
|
end
|
35
39
|
|
40
|
+
def order?
|
41
|
+
association_scope && association_scope.order_values.present?
|
42
|
+
end
|
43
|
+
|
36
44
|
def instance_dependent?
|
37
45
|
reflection.scope.present? && reflection.scope.arity > 0
|
38
46
|
end
|
data/lib/goldiloader/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goldiloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Turkel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|