deep_pluck 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/gemfiles/5.1.gemfile +14 -0
- data/lib/deep_pluck/model.rb +3 -1
- data/lib/deep_pluck/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5077b048b97b1e7e457fc7a7e86c4482ada1633c
|
4
|
+
data.tar.gz: 5a2c2cc80f8e0a30aa9013c1081650a7c092ad74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 217a43b1ac213499fc6138723a103e373c777e39adc9e3c61cca2ba51e578477e9084da2238ed8bcc49bdfcf3423c953aebf8d31cd46078adcf49127e0078ffa
|
7
|
+
data.tar.gz: ff5b2657d14cdadb7e3d2844d394c77c815253fcc21bbfde4d0df786356db92ed5e2ebcd498ad3e2d23e14898f117ade0d2ce08ac819ac499b1365331cf2ad8a
|
data/.travis.yml
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in pluck_all.gemspec
|
4
|
+
|
5
|
+
gem "activerecord", "~> 5.1"
|
6
|
+
gem "pluck_all", "~> 1.2.2"
|
7
|
+
|
8
|
+
group :test do
|
9
|
+
gem "simplecov"
|
10
|
+
gem "codeclimate-test-reporter", "~> 1.0.0"
|
11
|
+
end
|
12
|
+
|
13
|
+
gemspec :path => "../"
|
14
|
+
|
data/lib/deep_pluck/model.rb
CHANGED
@@ -78,7 +78,9 @@ module DeepPluck
|
|
78
78
|
ids.uniq!
|
79
79
|
ids.compact!
|
80
80
|
relation = with_conditions(reflect, relation)
|
81
|
-
|
81
|
+
query = { relation_key => ids }
|
82
|
+
query[reflect.type] = reflect.active_record.to_s if reflect.type
|
83
|
+
return relation.joins(get_join_table(reflect)).where(query)
|
82
84
|
end
|
83
85
|
def set_includes_data(parent, column_name, model)
|
84
86
|
reflect = get_reflect(column_name)
|
data/lib/deep_pluck/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep_pluck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- khiav reoy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- gemfiles/3.2.gemfile
|
116
116
|
- gemfiles/4.2.gemfile
|
117
117
|
- gemfiles/5.0.gemfile
|
118
|
+
- gemfiles/5.1.gemfile
|
118
119
|
- lib/deep_pluck.rb
|
119
120
|
- lib/deep_pluck/data_combiner.rb
|
120
121
|
- lib/deep_pluck/model.rb
|