deep_pluck_with_authorization 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/deep_pluck/model.rb +2 -1
- data/lib/deep_pluck/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eb47edfd38dbf3f42b407918031bc4aaa28a1b05f7d1e08815923c563704eee
|
4
|
+
data.tar.gz: f1af81befe86aa3462d8c1c400796d4ee954c239b8f3914caeee1202953d1a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e14762b346d406664953dc6d2e3a4e6f2fcc344d31e57bce69c202cfdda2c242c96805cebb3cc7d3eb9a2fbb59225e2f47e2f52f88f238c2357a5bbea7cf30b0
|
7
|
+
data.tar.gz: 3146ecb7424d97f6e4a3976bee0d130e13fa763a72e63a898cbaf8f1c89b3bc87cce967a99a3211c9c7edc5b745755a030210e80de011a9e0a933fdb736390ad
|
data/lib/deep_pluck/model.rb
CHANGED
@@ -110,7 +110,7 @@ module DeepPluck
|
|
110
110
|
children = model.load_data{|relation| do_query(parent, reflect, relation) }
|
111
111
|
# reverse = false: Child.where(:id => parent.pluck(:child_id))
|
112
112
|
# reverse = true : Child.where(:parent_id => parent.pluck(:id))
|
113
|
-
|
113
|
+
DataCombiner.combine_data(
|
114
114
|
parent,
|
115
115
|
children,
|
116
116
|
primary_key,
|
@@ -119,6 +119,7 @@ module DeepPluck
|
|
119
119
|
reverse,
|
120
120
|
reflect.collection?,
|
121
121
|
)
|
122
|
+
parent.each { |p| p[column_name] = p[column_name].first if p[column_name].is_a?(Array) } if reflect.has_one?
|
122
123
|
end
|
123
124
|
|
124
125
|
def get_query_columns
|
data/lib/deep_pluck/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep_pluck_with_authorization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Poilon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -149,8 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
|
-
|
153
|
-
rubygems_version: 2.7.6
|
152
|
+
rubygems_version: 3.0.6
|
154
153
|
signing_key:
|
155
154
|
specification_version: 4
|
156
155
|
summary: Use deep_pluck as a shortcut to select one or more attributes and include
|