dao-gateway-active_record 1.3.0 → 1.4.0
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: f25cfbe2e48082dfd1eb2320cc3ccf601354e86b
|
4
|
+
data.tar.gz: 28e6e6694abe405e24a9f993695ae7ebf165f331
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24728ce83fad31f66667f9f61f7d6a8faccc8667bc5dc7d3f57e81e41bf483c656c06d255dff0625c8742f5242532a3bf2e45500fa7eb30b2acbc7c4f90a3d03
|
7
|
+
data.tar.gz: 4e67228135668feb54f6b9aa12ecc687dfacde2ee28910ddb03704ca168faeb472743a23104afea0fe5ad1b3de3c2d32848e0960df3f226365205e267c3ddd62
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.required_ruby_version = '>= 2.2.2'
|
22
22
|
|
23
|
-
spec.add_dependency 'dao-gateway', '~> 1.
|
23
|
+
spec.add_dependency 'dao-gateway', '~> 1.4'
|
24
24
|
spec.add_dependency 'activerecord', '>= 4.2'
|
25
25
|
spec.add_dependency 'activesupport', '>= 4.2'
|
26
26
|
|
@@ -33,8 +33,15 @@ module Dao
|
|
33
33
|
raise Dao::Gateway::RecordNotFound, e.message
|
34
34
|
end
|
35
35
|
|
36
|
-
def add_relations(scope, relations)
|
37
|
-
|
36
|
+
def add_relations(scope, relations, options)
|
37
|
+
case options[:strategy]
|
38
|
+
when :preload
|
39
|
+
scope.preload(*relations)
|
40
|
+
when :includes
|
41
|
+
scope.includes(*relations)
|
42
|
+
else
|
43
|
+
scope.eager_load(*relations)
|
44
|
+
end
|
38
45
|
end
|
39
46
|
|
40
47
|
def with_transaction(&block)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dao-gateway-active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- llxff
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-12-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dao-gateway
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '1.
|
20
|
+
version: '1.4'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '1.
|
27
|
+
version: '1.4'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: activerecord
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|