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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 02452d4bac10e6638a4df989d324371064b4dd03
4
- data.tar.gz: f82443f03983bbb1c58c9e4a17a4057e483946bb
3
+ metadata.gz: 5077b048b97b1e7e457fc7a7e86c4482ada1633c
4
+ data.tar.gz: 5a2c2cc80f8e0a30aa9013c1081650a7c092ad74
5
5
  SHA512:
6
- metadata.gz: 89e9ef90f3a61e47dfb868075282b61376249db2cd685e81176cb2ae810f953bf34c1b0d737e9fd1ab21191bd5f67e84457993cfc002ab20177b3cfca5b29493
7
- data.tar.gz: 8f2b8a6c7f7d1dcc714c2937654d8758c7732ae13b9ea7d4a102909d111e5be45774ae0fd7662b8e98a2808e8a4500a273db104ac90edc62397f1a3b51891685
6
+ metadata.gz: 217a43b1ac213499fc6138723a103e373c777e39adc9e3c61cca2ba51e578477e9084da2238ed8bcc49bdfcf3423c953aebf8d31cd46078adcf49127e0078ffa
7
+ data.tar.gz: ff5b2657d14cdadb7e3d2844d394c77c815253fcc21bbfde4d0df786356db92ed5e2ebcd498ad3e2d23e14898f117ade0d2ce08ac819ac499b1365331cf2ad8a
data/.travis.yml CHANGED
@@ -12,6 +12,7 @@ gemfile:
12
12
  - gemfiles/3.2.gemfile
13
13
  - gemfiles/4.2.gemfile
14
14
  - gemfiles/5.0.gemfile
15
+ - gemfiles/5.1.gemfile
15
16
  addons:
16
17
  code_climate:
17
18
  repo_token: 29e69e7da6b55678f27b7de2444b6161a6c98e3c4b22e0e017ebab87ada18fd5
@@ -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
+
@@ -78,7 +78,9 @@ module DeepPluck
78
78
  ids.uniq!
79
79
  ids.compact!
80
80
  relation = with_conditions(reflect, relation)
81
- return relation.joins(get_join_table(reflect)).where(relation_key => ids)
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)
@@ -1,3 +1,3 @@
1
1
  module DeepPluck
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
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.2
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-04-03 00:00:00.000000000 Z
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