activerecord_nested_scope 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +4 -0
- data/lib/activerecord_nested_scope/builder.rb +2 -2
- data/lib/activerecord_nested_scope/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 873946315cf0ac4297ef8a4b16db871e009886c757f380006a4b980d67fbf59b
|
4
|
+
data.tar.gz: a05ed25fd35de7eb5b3418899f781105da5e8624b200da1689588f50cb00007b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe922e968ee53fce622f4fe149582167b6b16336c09d49befb57476ab5d79ee5a8acf2811390ee06d87dff2b676180a220a7579ffb672e47e1d509a0b44bf65a
|
7
|
+
data.tar.gz: c3954c2d58bdd3ef006556c0fb84ce613b3249784cad10a829e3eb1ce46cd5cad594ff7ef85070ba33bf025cae5c3457151680bf03ff9ced9fe0e1fb38765c91
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -33,14 +33,14 @@ module ActiveRecordNestedScope
|
|
33
33
|
return node.klass.none unless child
|
34
34
|
|
35
35
|
relation = child_relation(child, select: node.reflection.foreign_key)
|
36
|
-
node.klass.where(node.
|
36
|
+
node.klass.where(node.reflection.active_record_primary_key => relation)
|
37
37
|
end
|
38
38
|
|
39
39
|
def belongs_to_relation(node)
|
40
40
|
child = node.children.first
|
41
41
|
return node.klass.none unless child
|
42
42
|
|
43
|
-
relation = child_relation(child, select: node.reflection.
|
43
|
+
relation = child_relation(child, select: node.reflection.active_record_primary_key)
|
44
44
|
node.klass.where(node.reflection.foreign_key => relation)
|
45
45
|
end
|
46
46
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord_nested_scope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|